http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89260

Revision: 89260
Author:   freakolowsky
Date:     2011-06-01 13:57:50 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
* moved infobox to Html (r88109#c16937)

Modified Paths:
--------------
    trunk/phase3/includes/Html.php
    trunk/phase3/includes/Xml.php
    trunk/phase3/includes/installer/WebInstaller.php

Modified: trunk/phase3/includes/Html.php
===================================================================
--- trunk/phase3/includes/Html.php      2011-06-01 13:53:42 UTC (rev 89259)
+++ trunk/phase3/includes/Html.php      2011-06-01 13:57:50 UTC (rev 89260)
@@ -653,4 +653,47 @@
                                return false;
                }
        }
+       
+       /**
+        * Get HTML for an info box with an icon.
+        *
+        * @param $text String: wikitext, get this with wfMsgNoTrans()
+        * @param $icon String: icon name, file in skins/common/images
+        * @param $alt String: alternate text for the icon
+        * @param $class String: additional class name to add to the wrapper div
+        * @param $useStylePath
+        *
+        * @return string
+        */
+       static function infoBox( $text, $icon, $alt, $class = false, 
$useStylePath = true ) {
+               global $wgStylePath;
+               
+               if ( $useStylePath ) {
+                       $icon = $wgStylePath.'/common/images/'.$icon;
+               }
+               
+               
+               $s  = Xml::openElement( 'div', array( 'class' => "mw-infobox 
$class") );
+               
+               $s .= Xml::openElement( 'div', array( 'class' => 
'mw-infobox-left' ) ).
+                               Html::element( 'img',
+                                       array(
+                                               'src' => $icon,
+                                               'alt' => $alt,
+                                       )
+                               ).
+                               Xml::closeElement( 'div' );
+
+               $s .= Xml::openElement( 'div', array( 'class' => 
'mw-infobox-right' ) ).
+                               $text.
+                               Xml::closeElement( 'div' );
+               $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
+
+               $s .= Xml::closeElement( 'div' );
+
+               $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
+               
+               return $s;
+       }
+       
 }

Modified: trunk/phase3/includes/Xml.php
===================================================================
--- trunk/phase3/includes/Xml.php       2011-06-01 13:53:42 UTC (rev 89259)
+++ trunk/phase3/includes/Xml.php       2011-06-01 13:57:50 UTC (rev 89260)
@@ -804,48 +804,6 @@
                $s .= Xml::closeElement( 'tr' );
                return $s;
        }
-
-       /**
-        * Get HTML for an info box with an icon.
-        *
-        * @param $text String: wikitext, get this with wfMsgNoTrans()
-        * @param $icon String: icon name, file in skins/common/images
-        * @param $alt String: alternate text for the icon
-        * @param $class String: additional class name to add to the wrapper div
-        * @param $useStylePath
-        *
-        * @return string
-        */
-       static function infoBox( $text, $icon, $alt, $class = false, 
$useStylePath = true ) {
-               global $wgStylePath;
-               
-               if ( $useStylePath ) {
-                       $icon = $wgStylePath.'/common/images/'.$icon;
-               }
-               
-               
-               $s  = Xml::openElement( 'div', array( 'class' => "mw-infobox 
$class") );
-               
-               $s .= Xml::openElement( 'div', array( 'class' => 
'mw-infobox-left' ) ).
-                               Html::element( 'img',
-                                       array(
-                                               'src' => $icon,
-                                               'alt' => $alt,
-                                       )
-                               ).
-                               Xml::closeElement( 'div' );
-
-               $s .= Xml::openElement( 'div', array( 'class' => 
'mw-infobox-right' ) ).
-                               $text.
-                               Xml::closeElement( 'div' );
-               $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
-
-               $s .= Xml::closeElement( 'div' );
-
-               $s .= Xml::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
-               
-               return $s;
-       }
 }
 
 class XmlSelect {

Modified: trunk/phase3/includes/installer/WebInstaller.php
===================================================================
--- trunk/phase3/includes/installer/WebInstaller.php    2011-06-01 13:53:42 UTC 
(rev 89259)
+++ trunk/phase3/includes/installer/WebInstaller.php    2011-06-01 13:57:50 UTC 
(rev 89260)
@@ -615,7 +615,7 @@
                $text = $this->parse( $text, true );
                $icon = ( $icon == false ) ? 
'../skins/common/images/info-32.png' : '../skins/common/images/'.$icon;
                $alt = wfMsg( 'config-information' );
-               return Xml::infoBox( $text, $icon, $alt, $class, false );
+               return Html::infoBox( $text, $icon, $alt, $class, false );
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to