r25387 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25386‎ | r25387 | r25388 >
Date:12:38, 1 September 2007
Author:werdna
Status:old
Tags:
Comment:
Allow an element name to be specified in Xml::namespaceSelector.
Modified paths:
  • /trunk/phase3/includes/Xml.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Xml.php
@@ -99,7 +99,7 @@
100100 * @param bool $hidden Include hidden namespaces? [WTF? --RC]
101101 * @return string
102102 */
103 - public static function namespaceSelector( $selected = '', $all = null, $hidden = false ) {
 103+ public static function namespaceSelector( $selected = '', $all = null, $hidden = false, $element_name = 'namespace' ) {
104104 global $wgContLang;
105105 $namespaces = $wgContLang->getFormattedNamespaces();
106106 $options = array();
@@ -114,7 +114,7 @@
115115 $options[] = self::option( $name, $index, $index === $selected );
116116 }
117117
118 - return Xml::openElement( 'select', array( 'id' => 'namespace', 'name' => 'namespace',
 118+ return Xml::openElement( 'select', array( 'id' => 'namespace', 'name' => $element_name,
119119 'class' => 'namespaceselector' ) )
120120 . "\n"
121121 . implode( "\n", $options )

Follow-up revisions

RevisionCommit summaryAuthorDate
r25415Merged revisions 25372-25414 via svnmerge from...david21:15, 2 September 2007

Status & tagging log