From 5984c77899f2ca1cb9f7bb79a0bf50e66f9ff2ff Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 3 Aug 2014 14:25:52 -0700 Subject: [PATCH] Use wfScript() instead of global in a few places Change-Id: I3bb8eb52508e0f0ba40a889b400b0fc303311e29 --- includes/specials/SpecialBooksources.php | 4 +--- includes/specials/SpecialCategories.php | 4 +--- includes/specials/SpecialContributions.php | 4 +--- includes/specials/SpecialFileDuplicateSearch.php | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 581619fcdc..72f4e466e1 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -117,15 +117,13 @@ class SpecialBookSources extends SpecialPage { * @return string */ private function makeForm() { - global $wgScript; - $form = Html::openElement( 'fieldset' ) . "\n"; $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n"; - $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n"; + $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => wfScript() ) ) . "\n"; $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n"; $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index 3367bd4e12..95f9efd256 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -180,11 +180,9 @@ class CategoryPager extends AlphabeticPager { } public function getStartForm( $from ) { - global $wgScript; - return Xml::tags( 'form', - array( 'method' => 'get', 'action' => $wgScript ), + array( 'method' => 'get', 'action' => wfScript() ), Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . Xml::fieldset( $this->msg( 'categories' )->text(), diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index a884a39e39..15a5b749ad 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -396,8 +396,6 @@ class SpecialContributions extends IncludableSpecialPage { * @return string HTML fragment */ protected function getForm() { - global $wgScript; - $this->opts['title'] = $this->getPageTitle()->getPrefixedText(); if ( !isset( $this->opts['target'] ) ) { $this->opts['target'] = ''; @@ -449,7 +447,7 @@ class SpecialContributions extends IncludableSpecialPage { 'form', array( 'method' => 'get', - 'action' => $wgScript, + 'action' => wfScript(), 'class' => 'mw-contributions-form' ) ); diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 354960bb02..fc26c9030d 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -96,8 +96,6 @@ class FileDuplicateSearchPage extends QueryPage { } function execute( $par ) { - global $wgScript; - $this->setHeaders(); $this->outputHeader(); @@ -115,7 +113,7 @@ class FileDuplicateSearchPage extends QueryPage { $out->addHTML( Html::openElement( 'form', - array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) + array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => wfScript() ) ) . "\n" . Html::hidden( 'title', $this->getPageTitle()->getPrefixedDBkey() ) . "\n" . Html::openElement( 'fieldset' ) . "\n" . -- 2.20.1