[MediaWiki-commits] [Gerrit] Replace deprecated $wgSpecialPageGroups - change (mediawiki...OAuth)

2015-05-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace deprecated $wgSpecialPageGroups
..


Replace deprecated $wgSpecialPageGroups

$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: Id5265e6a21b777423981a0e6456c5ef67877df27
---
M frontend/MWOAuthUI.setup.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthListConsumers.php
M frontend/specialpages/SpecialMWOAuthManageConsumers.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
5 files changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/frontend/MWOAuthUI.setup.php b/frontend/MWOAuthUI.setup.php
index d5f89b6..d3aa768 100644
--- a/frontend/MWOAuthUI.setup.php
+++ b/frontend/MWOAuthUI.setup.php
@@ -12,13 +12,11 @@
 * @return void
 */
public static function unconditionalSetup() {
-   global $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, 
$wgResourceModules;
+   global $wgSpecialPages, $wgHooks, $wgResourceModules;
 
$wgSpecialPages['OAuth'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuth';
$wgSpecialPages['OAuthManageMyGrants'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthManageMyGrants';
-   $wgSpecialPageGroups['OAuthManageMyGrants'] = 'users';
$wgSpecialPages['OAuthListConsumers'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthListConsumers';
-   $wgSpecialPageGroups['OAuthListConsumers'] = 'users';
 
$wgHooks['GetPreferences'][] = 
'MediaWiki\Extensions\OAuth\MWOAuthUIHooks::onGetPreferences';
$wgHooks['MessagesPreLoad'][] = 
'MediaWiki\Extensions\OAuth\MWOAuthUIHooks::onMessagesPreLoad';
@@ -48,14 +46,12 @@
 * @return void
 */
public static function conditionalSetup() {
-   global $wgSpecialPages, $wgSpecialPageGroups;
+   global $wgSpecialPages;
global $wgLogTypes, $wgLogNames, $wgLogHeaders, 
$wgLogActionsHandlers;
 
if ( MWOAuthUtils::isCentralWiki() ) {
$wgSpecialPages['OAuthConsumerRegistration'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthConsumerRegistration';
-   $wgSpecialPageGroups['OAuthConsumerRegistration'] = 
'users';
$wgSpecialPages['OAuthManageConsumers'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthManageConsumers';
-   $wgSpecialPageGroups['OAuthManageConsumers'] = 'users';
 
$wgLogTypes[] = 'mwoauthconsumer';
$wgLogNames['mwoauthconsumer'] = 
'mwoauthconsumer-consumer-logpage';
diff --git a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php 
b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
index e5636f9..2ccf3af 100644
--- a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
+++ b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
@@ -463,6 +463,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthListConsumers.php 
b/frontend/specialpages/SpecialMWOAuthListConsumers.php
index b9ea117..e4b5c77 100644
--- a/frontend/specialpages/SpecialMWOAuthListConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthListConsumers.php
@@ -292,6 +292,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthManageConsumers.php 
b/frontend/specialpages/SpecialMWOAuthManageConsumers.php
index c45105c..8959e61 100755
--- a/frontend/specialpages/SpecialMWOAuthManageConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthManageConsumers.php
@@ -506,6 +506,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php 
b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
index efad8dc..e138547 100644
--- a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
+++ b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
@@ -319,6 +319,10 @@
}
return self::$irrevocableGrants;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5265e6a21b777423981a0e6456c5ef67877df27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Ger

[MediaWiki-commits] [Gerrit] Replace deprecated $wgSpecialPageGroups - change (mediawiki...OAuth)

2015-05-16 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/211418

Change subject: Replace deprecated $wgSpecialPageGroups
..

Replace deprecated $wgSpecialPageGroups

$wgSpecialPageGroups is deprecated since 1.21
override SpecialPage::getGroupName instead

Change-Id: Id5265e6a21b777423981a0e6456c5ef67877df27
---
M frontend/MWOAuthUI.setup.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthListConsumers.php
M frontend/specialpages/SpecialMWOAuthManageConsumers.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
5 files changed, 18 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/18/211418/1

diff --git a/frontend/MWOAuthUI.setup.php b/frontend/MWOAuthUI.setup.php
index d5f89b6..d3aa768 100644
--- a/frontend/MWOAuthUI.setup.php
+++ b/frontend/MWOAuthUI.setup.php
@@ -12,13 +12,11 @@
 * @return void
 */
public static function unconditionalSetup() {
-   global $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, 
$wgResourceModules;
+   global $wgSpecialPages, $wgHooks, $wgResourceModules;
 
$wgSpecialPages['OAuth'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuth';
$wgSpecialPages['OAuthManageMyGrants'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthManageMyGrants';
-   $wgSpecialPageGroups['OAuthManageMyGrants'] = 'users';
$wgSpecialPages['OAuthListConsumers'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthListConsumers';
-   $wgSpecialPageGroups['OAuthListConsumers'] = 'users';
 
$wgHooks['GetPreferences'][] = 
'MediaWiki\Extensions\OAuth\MWOAuthUIHooks::onGetPreferences';
$wgHooks['MessagesPreLoad'][] = 
'MediaWiki\Extensions\OAuth\MWOAuthUIHooks::onMessagesPreLoad';
@@ -48,14 +46,12 @@
 * @return void
 */
public static function conditionalSetup() {
-   global $wgSpecialPages, $wgSpecialPageGroups;
+   global $wgSpecialPages;
global $wgLogTypes, $wgLogNames, $wgLogHeaders, 
$wgLogActionsHandlers;
 
if ( MWOAuthUtils::isCentralWiki() ) {
$wgSpecialPages['OAuthConsumerRegistration'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthConsumerRegistration';
-   $wgSpecialPageGroups['OAuthConsumerRegistration'] = 
'users';
$wgSpecialPages['OAuthManageConsumers'] = 
'MediaWiki\Extensions\OAuth\SpecialMWOAuthManageConsumers';
-   $wgSpecialPageGroups['OAuthManageConsumers'] = 'users';
 
$wgLogTypes[] = 'mwoauthconsumer';
$wgLogNames['mwoauthconsumer'] = 
'mwoauthconsumer-consumer-logpage';
diff --git a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php 
b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
index e5636f9..2ccf3af 100644
--- a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
+++ b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
@@ -463,6 +463,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthListConsumers.php 
b/frontend/specialpages/SpecialMWOAuthListConsumers.php
index b9ea117..e4b5c77 100644
--- a/frontend/specialpages/SpecialMWOAuthListConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthListConsumers.php
@@ -292,6 +292,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthManageConsumers.php 
b/frontend/specialpages/SpecialMWOAuthManageConsumers.php
index c45105c..8959e61 100755
--- a/frontend/specialpages/SpecialMWOAuthManageConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthManageConsumers.php
@@ -506,6 +506,10 @@
 
return $r;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**
diff --git a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php 
b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
index efad8dc..e138547 100644
--- a/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
+++ b/frontend/specialpages/SpecialMWOAuthManageMyGrants.php
@@ -319,6 +319,10 @@
}
return self::$irrevocableGrants;
}
+
+   protected function getGroupName() {
+   return 'users';
+   }
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5265e6a21b777423981a0e6456c5ef67877df27
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: mast