From 58183b014a2edd64a88ce2cecebbf5c9cd5fdcb4 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 3 Aug 2014 17:28:34 -0700 Subject: [PATCH] SpecialProtectedPages: Use Config instead of globals Change-Id: Iecad936dca63dd9d2660d16a855ecd6a3336623e --- includes/specials/SpecialProtectedpages.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 7554e37b1a..b64b0291eb 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -103,11 +103,9 @@ class SpecialProtectedpages extends SpecialPage { protected function showOptions( $namespace, $type = 'edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect ) { - global $wgScript; - $title = $this->getPageTitle(); - return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . + return Xml::openElement( 'form', array( 'method' => 'get', 'action' => wfScript() ) ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), $this->msg( 'protectedpages' )->text() ) . Html::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" . @@ -252,14 +250,12 @@ class SpecialProtectedpages extends SpecialPage { * @return string Formatted HTML */ protected 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 ) { // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed' if ( $type != '' && $type != '*' ) { $text = $this->msg( "restriction-level-$type" )->text(); -- 2.20.1