De-globali[sz]e AllPages and Prefixindex
authorReedy <reedy@wikimedia.org>
Mon, 16 Jun 2014 17:39:07 +0000 (18:39 +0100)
committerIAlex <codereview@emsenhuber.ch>
Sat, 28 Jun 2014 12:17:55 +0000 (12:17 +0000)
Change-Id: I2ea969b3bf2573448562fd98b9306997bcfcfea4

includes/specials/SpecialAllPages.php
includes/specials/SpecialPrefixindex.php

index 17e080f..e4b606d 100644 (file)
@@ -98,11 +98,10 @@ class SpecialAllPages extends IncludableSpecialPage {
         * @return string
         */
        function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
-               global $wgScript;
                $t = $this->getPageTitle();
 
                $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', $t->getPrefixedText() );
                $out .= Xml::openElement( 'fieldset' );
                $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
index 2a1bf11..2e67e2b 100644 (file)
@@ -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() );