Use wfScript() instead of global in a few places
authorKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 21:25:52 +0000 (14:25 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 22:23:23 +0000 (15:23 -0700)
Change-Id: I3bb8eb52508e0f0ba40a889b400b0fc303311e29

includes/specials/SpecialBooksources.php
includes/specials/SpecialCategories.php
includes/specials/SpecialContributions.php
includes/specials/SpecialFileDuplicateSearch.php

index 581619f..72f4e46 100644 (file)
@@ -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 .= '<p>' . Xml::inputLabel(
                        $this->msg( 'booksources-isbn' )->text(),
index 3367bd4..95f9efd 100644 (file)
@@ -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(),
index a884a39..15a5b74 100644 (file)
@@ -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'
                        )
                );
index 354960b..fc26c90 100644 (file)
@@ -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" .