diff options
author | Andrew Garrett <werdna@users.mediawiki.org> | 2007-09-01 12:38:54 +0000 |
---|---|---|
committer | Andrew Garrett <werdna@users.mediawiki.org> | 2007-09-01 12:38:54 +0000 |
commit | 9b0e230fcd75a6b2cb78e79438259632323a1ff6 (patch) | |
tree | a89168a46a6fd923e19d4ed5321b1ad467b19e9a /includes/Xml.php | |
parent | 80a30fdb0126b0722c14383548868f263ca4efb6 (diff) | |
download | mediawikicore-9b0e230fcd75a6b2cb78e79438259632323a1ff6.tar.gz mediawikicore-9b0e230fcd75a6b2cb78e79438259632323a1ff6.zip |
Allow an element name to be specified in Xml::namespaceSelector.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/25387
Diffstat (limited to 'includes/Xml.php')
-rw-r--r-- | includes/Xml.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Xml.php b/includes/Xml.php index d7261a1f1964..fe4bb0cdec9c 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 ) |