[MediaWiki-commits] [Gerrit] Replace Html::... with self::... in the Html class - change (mediawiki/core)

2015-03-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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, 18 insertions(+), 18 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Html.php b/includes/Html.php
index 6bd661f..4b69885 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -170,7 +170,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
);
@@ -192,7 +192,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 ) );
}
 
/**
@@ -716,7 +716,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 );
}
@@ -819,7 +819,7 @@
} else {
$spacedValue = $value;
}
-   return self::element( 'textarea', Html::getTextInputAttributes( 
$attribs ), $spacedValue );
+   return self::element( 'textarea', self::getTextInputAttributes( 
$attribs ), $spacedValue );
}
 
/**
@@ -890,7 +890,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,
@@ -909,7 +909,7 @@
 
$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 @@
}
 
// 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;
}
@@ -962,7 +962,7 @@
$attribs['version'] = $wgHtml5Version;
}
 
-   $html = Html::openElement( 'html', $attribs );
+   $html = self::openElement( 'html', $attribs );
 
if ( $html ) {
$html .= \n;
@@ -998,25 +998,25 @@
 * @return string
 */
static function infoBox( $text, $icon, $alt, $class = '' ) {
-   $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 .= 

[MediaWiki-commits] [Gerrit] Replace Html::... with self::... in the Html class - change (mediawiki/core)

2015-03-26 Thread WMDE
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,