Fix for r79874: only set $mRevIdFetched from fetchContent(), it was overriden by...
[lhc/web/wiklou.git] / includes / specials / SpecialPrefixindex.php
index 874d755..09e7734 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();
@@ -54,12 +54,17 @@ class SpecialPrefixindex extends SpecialAllpages {
                        : wfMsg( 'prefixindex' )
                );
 
+               $showme = '';
                if( isset( $par ) ){
-                       $this->showPrefixChunk( $namespace, $par, $from );
-               } elseif( isset( $prefix ) ){
-                       $this->showPrefixChunk( $namespace, $prefix, $from );
-               } elseif( isset( $from ) ){
-                       $this->showPrefixChunk( $namespace, $from, $from );
+                       $showme = $par;
+               } elseif( $prefix != '' ){
+                       $showme = $prefix;
+               } elseif( $from != '' ){
+                       // For back-compat with Special:Allpages
+                       $showme = $from;
+               }
+               if ($showme != '' || $namespace) {
+                       $this->showPrefixChunk( $namespace, $showme, $from );
                } else {
                        $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );
                }
@@ -76,7 +81,7 @@ class SpecialPrefixindex extends SpecialAllpages {
 
                $out  = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
                $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
-               $out .= Xml::hidden( 'title', $t->getPrefixedText() );
+               $out .= Html::hidden( 'title', $t->getPrefixedText() );
                $out .= Xml::openElement( 'fieldset' );
                $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
                $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
@@ -128,7 +133,7 @@ class SpecialPrefixindex extends SpecialAllpages {
                        $namespace = NS_MAIN;
                } else {
                        list( $namespace, $prefixKey, $prefix ) = $prefixList;
-                       list( /* $fromNs */, $fromKey, $from ) = $fromList;
+                       list( /* $fromNS */, $fromKey, ) = $fromList;
 
                        ### FIXME: should complain if $fromNs != $namespace