X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FXml.php;h=16a5a9ddecc8a608801e38bc8c542d36244bed81;hp=8289b818c1446955bd5da50032366cee34013975;hb=e7720b8f8e09287384ddee271641d1b1721318bb;hpb=163381a0913f97b07231bf6e862bfbf618055740 diff --git a/includes/Xml.php b/includes/Xml.php index 8289b818c1..16a5a9ddec 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -225,7 +225,7 @@ class Xml { $selected = isset( $languages[$selected] ) ? $selected : $wgLanguageCode; $options = "\n"; foreach ( $languages as $code => $name ) { - $options .= Xml::option( "$code - $name", $code, $code == $selected ) . "\n"; + $options .= self::option( "$code - $name", $code, $code == $selected ) . "\n"; } $attrs = [ 'id' => 'wpUserLanguage', 'name' => 'wpUserLanguage' ]; @@ -235,8 +235,8 @@ class Xml { $msg = wfMessage( 'yourlanguage' ); } return [ - Xml::label( $msg->text(), $attrs['id'] ), - Xml::tags( 'select', $attrs, $options ) + self::label( $msg->text(), $attrs['id'] ), + self::tags( 'select', $attrs, $options ) ]; } @@ -400,7 +400,7 @@ class Xml { $value = false, $attribs = [] ) { return [ - Xml::label( $label, $id, $attribs ), + self::label( $label, $id, $attribs ), self::input( $name, $size, $value, [ 'id' => $id ] + $attribs ) ]; } @@ -556,11 +556,11 @@ class Xml { $attribs['tabindex'] = $tabindex; } - return Xml::openElement( 'select', $attribs ) + return self::openElement( 'select', $attribs ) . "\n" . $options . "\n" - . Xml::closeElement( 'select' ); + . self::closeElement( 'select' ); } /** @@ -575,15 +575,15 @@ class Xml { * @return string */ public static function fieldset( $legend = false, $content = false, $attribs = [] ) { - $s = Xml::openElement( 'fieldset', $attribs ) . "\n"; + $s = self::openElement( 'fieldset', $attribs ) . "\n"; if ( $legend ) { - $s .= Xml::element( 'legend', null, $legend ) . "\n"; + $s .= self::element( 'legend', null, $legend ) . "\n"; } if ( $content !== false ) { $s .= $content . "\n"; - $s .= Xml::closeElement( 'fieldset' ) . "\n"; + $s .= self::closeElement( 'fieldset' ) . "\n"; } return $s; @@ -644,7 +644,7 @@ class Xml { */ public static function encodeJsCall( $name, $args, $pretty = false ) { foreach ( $args as &$arg ) { - $arg = Xml::encodeJsVar( $arg, $pretty ); + $arg = self::encodeJsVar( $arg, $pretty ); if ( $arg === false ) { return false; } @@ -702,7 +702,7 @@ class Xml { $text . ''; - return Xml::isWellFormed( $html ); + return self::isWellFormed( $html ); } /** @@ -736,25 +736,25 @@ class Xml { foreach ( $fields as $labelmsg => $input ) { $id = "mw-$labelmsg"; - $form .= Xml::openElement( 'tr', [ 'id' => $id ] ); + $form .= self::openElement( 'tr', [ 'id' => $id ] ); // TODO use a