Merge "jquery.makeCollapsible: No tabindex="0" for default buttons"
[lhc/web/wiklou.git] / includes / specials / SpecialPrefixindex.php
index b6b60d4..2e67e2b 100644 (file)
@@ -26,7 +26,7 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialPrefixindex extends SpecialAllpages {
+class SpecialPrefixindex extends SpecialAllPages {
 
        /**
         * Whether to remove the searched prefix from the displayed link. Useful
@@ -76,7 +76,7 @@ class SpecialPrefixindex extends SpecialAllpages {
                );
 
                $showme = '';
-               if ( isset( $par ) ) {
+               if ( $par !== null ) {
                        $showme = $par;
                } elseif ( $prefix != '' ) {
                        $showme = $prefix;
@@ -101,10 +101,8 @@ class SpecialPrefixindex extends SpecialAllpages {
         * @return string
         */
        protected function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) {
-               global $wgScript;
-
                $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
-               $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
+               $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $this->getConfig()->get( 'Script' ) ) );
                $out .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() );
                $out .= Xml::openElement( 'fieldset' );
                $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
@@ -167,6 +165,7 @@ class SpecialPrefixindex extends SpecialAllpages {
                $fromList = $this->getNamespaceKeyAndText( $namespace, $from );
                $prefixList = $this->getNamespaceKeyAndText( $namespace, $prefix );
                $namespaces = $wgContLang->getNamespaces();
+               $res = null;
 
                if ( !$prefixList || !$fromList ) {
                        $out = $this->msg( 'allpagesbadtitle' )->parseAsBlock();
@@ -261,9 +260,7 @@ class SpecialPrefixindex extends SpecialAllpages {
                                '</td>
                                <td id="mw-prefixindex-nav-form" class="mw-prefixindex-nav">';
 
-                       if ( isset( $res ) && $res && ( $n == $this->maxPerPage ) &&
-                               ( $s = $res->fetchObject() )
-                       ) {
+                       if ( $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
                                $query = array(
                                        'from' => $s->page_title,
                                        'prefix' => $prefix,