* (bug 3807) Fix 'all' in namespaces drop-down on contribs, rc
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 27 Oct 2005 21:59:53 +0000 (21:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 27 Oct 2005 21:59:53 +0000 (21:59 +0000)
RELEASE-NOTES
includes/GlobalFunctions.php
includes/SpecialContributions.php

index a2a7f8e..66b6900 100644 (file)
@@ -176,6 +176,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 2324) image for redirects should be without text and oriented according to content language
 * (bug 3803) Fix links on Special:Wantedcategories with miser mode off
 * Fix Special:BrokenRedirects on MySQL 5.0
+* (bug 3807) Fix 'all' in namespaces drop-down on contribs, rc
 
 
 === Caveats ===
index 367adf3..1b07a15 100644 (file)
@@ -1323,6 +1323,15 @@ function wfCloseElement( $element ) { return "</$element>"; }
  */
 function &HTMLnamespaceselector($selected = '', $allnamespaces = null) {
        global $wgContLang;
+       if( $selected !== '' ) {
+               if( is_null( $selected ) ) {
+                       // No namespace selected; let exact match work without hitting Main
+                       $selected = '';
+               } else {
+                       // Let input be numeric strings without breaking the empty match.
+                       $selected = intval( $selected );
+               }
+       }
        $s = "<select name='namespace' class='namespaceselector'>\n\t";
        $arr = $wgContLang->getFormattedNamespaces();
        if( !is_null($allnamespaces) ) {
index eb31198..051f913 100644 (file)
@@ -252,7 +252,7 @@ function wfSpecialContributions( $par = null ) {
        $nsform .= "<p>";
        $nsform .= wfMsgHtml('namespace');
 
-       $nsform .= HTMLnamespaceselector((int)$ns, '');
+       $nsform .= HTMLnamespaceselector( $ns, '' );
 
        $nsform .= wfElement("input", array(
                        "type" => "submit",