From: Kunal Mehta Date: Mon, 4 Aug 2014 00:30:44 +0000 (-0700) Subject: SpecialProtectedTitles: Use Config instead of globals X-Git-Tag: 1.31.0-rc.0~14559^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=ce29a5b9670b35b074219ac21758a5f0e552b833;p=lhc%2Fweb%2Fwiklou.git SpecialProtectedTitles: Use Config instead of globals Change-Id: I5d11a642026e3771528c6627864083e63b68f9b2 --- diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index b377d0e866..b84540ce6a 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -133,8 +133,7 @@ class SpecialProtectedtitles extends SpecialPage { * @private */ function showOptions( $namespace, $type = 'edit', $level ) { - global $wgScript; - $action = htmlspecialchars( $wgScript ); + $action = htmlspecialchars( wfScript() ); $title = $this->getPageTitle(); $special = htmlspecialchars( $title->getPrefixedDBkey() ); @@ -175,14 +174,12 @@ class SpecialProtectedtitles extends SpecialPage { * @private */ function getLevelMenu( $pr_level ) { - global $wgRestrictionLevels; - // Temporary array $m = array( $this->msg( 'restriction-level-all' )->text() => 0 ); $options = array(); // First pass to load the log names - foreach ( $wgRestrictionLevels as $type ) { + foreach ( $this->getConfig()->get( 'RestrictionLevels' ) as $type ) { if ( $type != '' && $type != '*' ) { // Messages: restriction-level-sysop, restriction-level-autoconfirmed $text = $this->msg( "restriction-level-$type" )->text();