Followup for r75314 (bug 23923) -- regression fix for prefix of '0' being ignored...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 25 Oct 2010 23:49:03 +0000 (23:49 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 25 Oct 2010 23:49:03 +0000 (23:49 +0000)
Don't forget that the string '0' evaluates to false in boolean context!

includes/specials/SpecialPrefixindex.php

index dbf47ed..36ac08b 100644 (file)
@@ -56,9 +56,9 @@ class SpecialPrefixindex extends SpecialAllpages {
 
                if( isset( $par ) ){
                        $this->showPrefixChunk( $namespace, $par, $from );
-               } elseif( $prefix ){
+               } elseif( $prefix != '' ){
                        $this->showPrefixChunk( $namespace, $prefix, $from );
-               } elseif( $from ){
+               } elseif( $from != '' ){
                        $this->showPrefixChunk( $namespace, $from, $from );
                } else {
                        $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );