From: Andrew Garrett Date: Sat, 1 Sep 2007 12:38:54 +0000 (+0000) Subject: Allow an element name to be specified in Xml::namespaceSelector. X-Git-Tag: 1.31.0-rc.0~51568 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9b0e230fcd75a6b2cb78e79438259632323a1ff6;p=lhc%2Fweb%2Fwiklou.git Allow an element name to be specified in Xml::namespaceSelector. --- diff --git a/includes/Xml.php b/includes/Xml.php index d7261a1f19..fe4bb0cdec 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -99,7 +99,7 @@ class Xml { * @param bool $hidden Include hidden namespaces? [WTF? --RC] * @return string */ - public static function namespaceSelector( $selected = '', $all = null, $hidden = false ) { + public static function namespaceSelector( $selected = '', $all = null, $hidden = false, $element_name = 'namespace' ) { global $wgContLang; $namespaces = $wgContLang->getFormattedNamespaces(); $options = array(); @@ -114,7 +114,7 @@ class Xml { $options[] = self::option( $name, $index, $index === $selected ); } - return Xml::openElement( 'select', array( 'id' => 'namespace', 'name' => 'namespace', + return Xml::openElement( 'select', array( 'id' => 'namespace', 'name' => $element_name, 'class' => 'namespaceselector' ) ) . "\n" . implode( "\n", $options )