Use wfScript() instead of globals in a few places
authorKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 23:41:53 +0000 (16:41 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sun, 3 Aug 2014 23:42:46 +0000 (16:42 -0700)
Change-Id: I8a23e7b647c082119799b5bc8cfd5ff76c712f85

includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialMergeHistory.php

index 4d9e7da..3f1850d 100644 (file)
@@ -105,8 +105,6 @@ class MIMEsearchPage extends QueryPage {
        }
 
        function execute( $par ) {
-               global $wgScript;
-
                $mime = $par ? $par : $this->getRequest()->getText( 'mime' );
                $mime = trim( $mime );
 
@@ -115,7 +113,7 @@ class MIMEsearchPage extends QueryPage {
                $this->getOutput()->addHTML(
                        Xml::openElement(
                                'form',
-                               array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgScript )
+                               array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => wfScript() )
                        ) .
                                Xml::openElement( 'fieldset' ) .
                                Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
index e1700de..6efc12b 100644 (file)
@@ -159,14 +159,12 @@ class SpecialMergeHistory extends SpecialPage {
        }
 
        function showMergeForm() {
-               global $wgScript;
-
                $this->getOutput()->addWikiMsg( 'mergehistory-header' );
 
                $this->getOutput()->addHTML(
                        Xml::openElement( 'form', array(
                                'method' => 'get',
-                               'action' => $wgScript ) ) .
+                               'action' => wfScript() ) ) .
                                '<fieldset>' .
                                Xml::element( 'legend', array(),
                                        $this->msg( 'mergehistory-box' )->text() ) .