From a3107aee5f2b4727a42d24f22777ccf9162a0539 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 16 Jun 2014 18:39:07 +0100 Subject: [PATCH] De-globali[sz]e AllPages and Prefixindex Change-Id: I2ea969b3bf2573448562fd98b9306997bcfcfea4 --- includes/specials/SpecialAllPages.php | 3 +-- includes/specials/SpecialPrefixindex.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialAllPages.php b/includes/specials/SpecialAllPages.php index 17e080f83e..e4b606d3f4 100644 --- a/includes/specials/SpecialAllPages.php +++ b/includes/specials/SpecialAllPages.php @@ -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() ); diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 2a1bf11fe2..2e67e2b54c 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -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() ); -- 2.20.1