SpecialUserRights: Use Config instead of globals
authorKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:41:23 +0000 (16:41 +0100)
committerKunal Mehta <legoktm@gmail.com>
Wed, 6 Aug 2014 15:41:23 +0000 (16:41 +0100)
Change-Id: Ied99264c0d47023cefec9b5d37d758978c480ee2

includes/specials/SpecialUserrights.php

index 0ec85ba..cefdad0 100644 (file)
@@ -328,9 +328,7 @@ class UserrightsPage extends SpecialPage {
         * @return Status
         */
        public function fetchUser( $username ) {
-               global $wgUserrightsInterwikiDelimiter;
-
-               $parts = explode( $wgUserrightsInterwikiDelimiter, $username );
+               $parts = explode( $this->getConfig()->get( 'UserrightsInterwikiDelimiter' ), $username );
                if ( count( $parts ) < 2 ) {
                        $name = trim( $username );
                        $database = '';
@@ -417,13 +415,12 @@ class UserrightsPage extends SpecialPage {
         * Output a form to allow searching for a user
         */
        function switchForm() {
-               global $wgScript;
                $this->getOutput()->addHTML(
                        Html::openElement(
                                'form',
                                array(
                                        'method' => 'get',
-                                       'action' => $wgScript,
+                                       'action' => wfScript(),
                                        'name' => 'uluser',
                                        'id' => 'mw-userrights-form1'
                                )