Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/199844

Change subject: Replace Html::... with self::... in the Html class
......................................................................

Replace Html::... with self::... in the Html class

How cool is that, I can call a patch "SelfHTML". ;-)

Change-Id: I17d36bc45a349c92715b88004aaae046d4f7be1c
---
M includes/Html.php
1 file changed, 24 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/199844/1

diff --git a/includes/Html.php b/includes/Html.php
index ed77729..6f22243 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -169,7 +169,7 @@
         * @return string Raw HTML
         */
        public static function linkButton( $contents, $attrs, $modifiers = 
array() ) {
-               return Html::element( 'a',
+               return self::element( 'a',
                        self::buttonAttributes( $attrs, $modifiers ),
                        $contents
                );
@@ -191,7 +191,7 @@
        public static function submitButton( $contents, $attrs, $modifiers = 
array() ) {
                $attrs['type'] = 'submit';
                $attrs['value'] = $contents;
-               return Html::element( 'input', self::buttonAttributes( $attrs, 
$modifiers ) );
+               return self::element( 'input', self::buttonAttributes( $attrs, 
$modifiers ) );
        }
 
        /**
@@ -460,7 +460,7 @@
         *
         * @par Numerical array
         * @code
-        *     Html::element( 'em', array(
+        *     self::element( 'em', array(
         *         'class' => array( 'foo', 'bar' )
         *     ) );
         *     // gives '<em class="foo bar"></em>'
@@ -468,7 +468,7 @@
         *
         * @par Associative array
         * @code
-        *     Html::element( 'em', array(
+        *     self::element( 'em', array(
         *         'class' => array( 'foo', 'bar', 'foo' => false, 'quux' => 
true )
         *     ) );
         *     // gives '<em class="bar quux"></em>'
@@ -707,7 +707,7 @@
         * @param array $value Value attribute
         * @param string $type Type attribute
         * @param array $attribs Associative array of miscellaneous extra
-        *   attributes, passed to Html::element()
+        *   attributes, passed to self::element()
         * @return string Raw HTML
         */
        public static function input( $name, $value = '', $type = 'text', 
$attribs = array() ) {
@@ -715,7 +715,7 @@
                $attribs['value'] = $value;
                $attribs['name'] = $name;
                if ( in_array( $type, array( 'text', 'search', 'email', 
'password', 'number' ) ) ) {
-                       $attribs = Html::getTextInputAttributes( $attribs );
+                       $attribs = self::getTextInputAttributes( $attribs );
                }
                return self::element( 'input', $attribs );
        }
@@ -787,7 +787,7 @@
         * @param string $name Name attribute
         * @param string $value Value attribute
         * @param array $attribs Associative array of miscellaneous extra
-        *   attributes, passed to Html::element()
+        *   attributes, passed to self::element()
         * @return string Raw HTML
         */
        public static function hidden( $name, $value, $attribs = array() ) {
@@ -803,7 +803,7 @@
         * @param string $name Name attribute
         * @param string $value Value attribute
         * @param array $attribs Associative array of miscellaneous extra
-        *   attributes, passed to Html::element()
+        *   attributes, passed to self::element()
         * @return string Raw HTML
         */
        public static function textarea( $name, $value = '', $attribs = array() 
) {
@@ -818,7 +818,7 @@
                } else {
                        $spacedValue = $value;
                }
-               return self::element( 'textarea', Html::getTextInputAttributes( 
$attribs ), $spacedValue );
+               return self::element( 'textarea', self::getTextInputAttributes( 
$attribs ), $spacedValue );
        }
 
        /**
@@ -889,7 +889,7 @@
                        } elseif ( is_int( $nsId ) ) {
                                $nsName = $wgContLang->convertNamespace( $nsId 
);
                        }
-                       $optionsHtml[] = Html::element(
+                       $optionsHtml[] = self::element(
                                'option', array(
                                        'disabled' => in_array( $nsId, 
$params['disable'] ),
                                        'value' => $nsId,
@@ -908,7 +908,7 @@
 
                $ret = '';
                if ( isset( $params['label'] ) ) {
-                       $ret .= Html::element(
+                       $ret .= self::element(
                                'label', array(
                                        'for' => isset( $selectAttribs['id'] ) 
? $selectAttribs['id'] : null,
                                ), $params['label']
@@ -916,11 +916,11 @@
                }
 
                // Wrap options in a <select>
-               $ret .= Html::openElement( 'select', $selectAttribs )
+               $ret .= self::openElement( 'select', $selectAttribs )
                        . "\n"
                        . implode( "\n", $optionsHtml )
                        . "\n"
-                       . Html::closeElement( 'select' );
+                       . self::closeElement( 'select' );
 
                return $ret;
        }
@@ -930,7 +930,7 @@
         * global variables.
         *
         * @param array $attribs Associative array of miscellaneous extra
-        *   attributes, passed to Html::element() of html tag.
+        *   attributes, passed to self::element() of html tag.
         * @return string Raw HTML
         */
        public static function htmlHeader( $attribs = array() ) {
@@ -961,7 +961,7 @@
                        $attribs['version'] = $wgHtml5Version;
                }
 
-               $html = Html::openElement( 'html', $attribs );
+               $html = self::openElement( 'html', $attribs );
 
                if ( $html ) {
                        $html .= "\n";
@@ -997,25 +997,25 @@
         * @return string
         */
        static function infoBox( $text, $icon, $alt, $class = false ) {
-               $s = Html::openElement( 'div', array( 'class' => "mw-infobox 
$class" ) );
+               $s = self::openElement( 'div', array( 'class' => "mw-infobox 
$class" ) );
 
-               $s .= Html::openElement( 'div', array( 'class' => 
'mw-infobox-left' ) ) .
-                               Html::element( 'img',
+               $s .= self::openElement( 'div', array( 'class' => 
'mw-infobox-left' ) ) .
+                               self::element( 'img',
                                        array(
                                                'src' => $icon,
                                                'alt' => $alt,
                                        )
                                ) .
-                               Html::closeElement( 'div' );
+                               self::closeElement( 'div' );
 
-               $s .= Html::openElement( 'div', array( 'class' => 
'mw-infobox-right' ) ) .
+               $s .= self::openElement( 'div', array( 'class' => 
'mw-infobox-right' ) ) .
                                $text .
-                               Html::closeElement( 'div' );
-               $s .= Html::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
+                               self::closeElement( 'div' );
+               $s .= self::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
 
-               $s .= Html::closeElement( 'div' );
+               $s .= self::closeElement( 'div' );
 
-               $s .= Html::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
+               $s .= self::element( 'div', array( 'style' => 'clear: left;' ), 
' ' );
 
                return $s;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/199844
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17d36bc45a349c92715b88004aaae046d4f7be1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to