From: Kunal Mehta Date: Mon, 4 Aug 2014 00:28:34 +0000 (-0700) Subject: SpecialProtectedPages: Use Config instead of globals X-Git-Tag: 1.31.0-rc.0~14600^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=58183b014a2edd64a88ce2cecebbf5c9cd5fdcb4;p=lhc%2Fweb%2Fwiklou.git SpecialProtectedPages: Use Config instead of globals Change-Id: Iecad936dca63dd9d2660d16a855ecd6a3336623e --- 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();