jenkins-bot has submitted this change and it was merged.

Change subject: SpecialProtectedPages: Use Config instead of globals
......................................................................


SpecialProtectedPages: Use Config instead of globals

Change-Id: Iecad936dca63dd9d2660d16a855ecd6a3336623e
---
M includes/specials/SpecialProtectedpages.php
1 file changed, 2 insertions(+), 6 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialProtectedpages.php 
b/includes/specials/SpecialProtectedpages.php
index 7554e37..b64b029 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -103,11 +103,9 @@
        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 @@
         * @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();

-- 
To view, visit https://gerrit.wikimedia.org/r/151561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecad936dca63dd9d2660d16a855ecd6a3336623e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to