From 5a84fbf457e8445b03632fa33a77f1d488c2ec49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Thu, 26 Mar 2015 10:17:07 +0100 Subject: [PATCH] Replace Html::... with self::... in the Html class How cool is that, I can call a patch "SelfHTML". ;-) Change-Id: I17d36bc45a349c92715b88004aaae046d4f7be1c --- includes/Html.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/includes/Html.php b/includes/Html.php index 6bd661fae7..4b698858d4 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -170,7 +170,7 @@ class Html { * @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 ); @@ -192,7 +192,7 @@ class Html { 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 ) ); } /** @@ -716,7 +716,7 @@ class Html { $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 ); } @@ -819,7 +819,7 @@ class Html { } else { $spacedValue = $value; } - return self::element( 'textarea', Html::getTextInputAttributes( $attribs ), $spacedValue ); + return self::element( 'textarea', self::getTextInputAttributes( $attribs ), $spacedValue ); } /** @@ -890,7 +890,7 @@ class Html { } elseif ( is_int( $nsId ) ) { $nsName = $wgContLang->convertNamespace( $nsId ); } - $optionsHtml[] = Html::element( + $optionsHtml[] = self::element( 'option', array( 'disabled' => in_array( $nsId, $params['disable'] ), 'value' => $nsId, @@ -909,7 +909,7 @@ class Html { $ret = ''; if ( isset( $params['label'] ) ) { - $ret .= Html::element( + $ret .= self::element( 'label', array( 'for' => isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null, ), $params['label'] @@ -917,11 +917,11 @@ class Html { } // Wrap options in a