From ce29a5b9670b35b074219ac21758a5f0e552b833 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 3 Aug 2014 17:30:44 -0700 Subject: [PATCH] SpecialProtectedTitles: Use Config instead of globals Change-Id: I5d11a642026e3771528c6627864083e63b68f9b2 --- includes/specials/SpecialProtectedtitles.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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(); -- 2.20.1