Index: trunk/phase3/includes/Xml.php |
— | — | @@ -804,48 +804,6 @@ |
805 | 805 | $s .= Xml::closeElement( 'tr' ); |
806 | 806 | return $s; |
807 | 807 | } |
808 | | - |
809 | | - /** |
810 | | - * Get HTML for an info box with an icon. |
811 | | - * |
812 | | - * @param $text String: wikitext, get this with wfMsgNoTrans() |
813 | | - * @param $icon String: icon name, file in skins/common/images |
814 | | - * @param $alt String: alternate text for the icon |
815 | | - * @param $class String: additional class name to add to the wrapper div |
816 | | - * @param $useStylePath |
817 | | - * |
818 | | - * @return string |
819 | | - */ |
820 | | - static function infoBox( $text, $icon, $alt, $class = false, $useStylePath = true ) { |
821 | | - global $wgStylePath; |
822 | | - |
823 | | - if ( $useStylePath ) { |
824 | | - $icon = $wgStylePath.'/common/images/'.$icon; |
825 | | - } |
826 | | - |
827 | | - |
828 | | - $s = Xml::openElement( 'div', array( 'class' => "mw-infobox $class") ); |
829 | | - |
830 | | - $s .= Xml::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ). |
831 | | - Html::element( 'img', |
832 | | - array( |
833 | | - 'src' => $icon, |
834 | | - 'alt' => $alt, |
835 | | - ) |
836 | | - ). |
837 | | - Xml::closeElement( 'div' ); |
838 | | - |
839 | | - $s .= Xml::openElement( 'div', array( 'class' => 'mw-infobox-right' ) ). |
840 | | - $text. |
841 | | - Xml::closeElement( 'div' ); |
842 | | - $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), ' ' ); |
843 | | - |
844 | | - $s .= Xml::closeElement( 'div' ); |
845 | | - |
846 | | - $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), ' ' ); |
847 | | - |
848 | | - return $s; |
849 | | - } |
850 | 808 | } |
851 | 809 | |
852 | 810 | class XmlSelect { |
Index: trunk/phase3/includes/Html.php |
— | — | @@ -653,4 +653,47 @@ |
654 | 654 | return false; |
655 | 655 | } |
656 | 656 | } |
| 657 | + |
| 658 | + /** |
| 659 | + * Get HTML for an info box with an icon. |
| 660 | + * |
| 661 | + * @param $text String: wikitext, get this with wfMsgNoTrans() |
| 662 | + * @param $icon String: icon name, file in skins/common/images |
| 663 | + * @param $alt String: alternate text for the icon |
| 664 | + * @param $class String: additional class name to add to the wrapper div |
| 665 | + * @param $useStylePath |
| 666 | + * |
| 667 | + * @return string |
| 668 | + */ |
| 669 | + static function infoBox( $text, $icon, $alt, $class = false, $useStylePath = true ) { |
| 670 | + global $wgStylePath; |
| 671 | + |
| 672 | + if ( $useStylePath ) { |
| 673 | + $icon = $wgStylePath.'/common/images/'.$icon; |
| 674 | + } |
| 675 | + |
| 676 | + |
| 677 | + $s = Xml::openElement( 'div', array( 'class' => "mw-infobox $class") ); |
| 678 | + |
| 679 | + $s .= Xml::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ). |
| 680 | + Html::element( 'img', |
| 681 | + array( |
| 682 | + 'src' => $icon, |
| 683 | + 'alt' => $alt, |
| 684 | + ) |
| 685 | + ). |
| 686 | + Xml::closeElement( 'div' ); |
| 687 | + |
| 688 | + $s .= Xml::openElement( 'div', array( 'class' => 'mw-infobox-right' ) ). |
| 689 | + $text. |
| 690 | + Xml::closeElement( 'div' ); |
| 691 | + $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), ' ' ); |
| 692 | + |
| 693 | + $s .= Xml::closeElement( 'div' ); |
| 694 | + |
| 695 | + $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), ' ' ); |
| 696 | + |
| 697 | + return $s; |
| 698 | + } |
| 699 | + |
657 | 700 | } |
Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -615,7 +615,7 @@ |
616 | 616 | $text = $this->parse( $text, true ); |
617 | 617 | $icon = ( $icon == false ) ? '../skins/common/images/info-32.png' : '../skins/common/images/'.$icon; |
618 | 618 | $alt = wfMsg( 'config-information' ); |
619 | | - return Xml::infoBox( $text, $icon, $alt, $class, false ); |
| 619 | + return Html::infoBox( $text, $icon, $alt, $class, false ); |
620 | 620 | } |
621 | 621 | |
622 | 622 | /** |