(bug 23923) Special:Prefixindex no longer shows results if nothing was requested.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 24 Oct 2010 15:33:00 +0000 (15:33 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 24 Oct 2010 15:33:00 +0000 (15:33 +0000)
I believe that this was the intention of the original code anyway, but isset was used on places where it should not have been.

RELEASE-NOTES
includes/specials/SpecialPrefixindex.php

index 81594ba..c8e8209 100644 (file)
@@ -362,6 +362,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   available via the API
 * (bug 23934) Groups defined in $wgRevokePermissions but not in
   $wgGroupPermissions now appear on Special:ListGroupRights
+* (bug 23923) Special:Prefixindex no longer shows results if nothing was
+  requested.
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 874d755..dbf47ed 100644 (file)
@@ -44,7 +44,7 @@ class SpecialPrefixindex extends SpecialAllpages {
                $this->outputHeader();
 
                # GET values
-               $from = $wgRequest->getVal( 'from' );
+               $from = $wgRequest->getVal( 'from', '' );
                $prefix = $wgRequest->getVal( 'prefix', '' );
                $namespace = $wgRequest->getInt( 'namespace' );
                $namespaces = $wgContLang->getNamespaces();
@@ -56,9 +56,9 @@ class SpecialPrefixindex extends SpecialAllpages {
 
                if( isset( $par ) ){
                        $this->showPrefixChunk( $namespace, $par, $from );
-               } elseif( isset( $prefix ) ){
+               } elseif( $prefix ){
                        $this->showPrefixChunk( $namespace, $prefix, $from );
-               } elseif( isset( $from ) ){
+               } elseif( $from ){
                        $this->showPrefixChunk( $namespace, $from, $from );
                } else {
                        $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );