From 9b0e230fcd75a6b2cb78e79438259632323a1ff6 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sat, 1 Sep 2007 12:38:54 +0000 Subject: [PATCH] Allow an element name to be specified in Xml::namespaceSelector. --- includes/Xml.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) -- 2.20.1