r45293 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45292‎ | r45293 | r45294 >
Date:19:52, 1 January 2009
Author:pinky
Status:ok
Tags:
Comment:
Remove useless extension global and bump version
Modified paths:
  • /trunk/extensions/GlobalUserrights/GlobalUserrights.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalUserrights/GlobalUserrights.php
@@ -16,7 +16,7 @@
1717 $wgExtensionCredits['specialpage'][] = array(
1818 'name' => 'GlobalUserrights',
1919 'url' => 'http://www.mediawiki.org/wiki/Extension:GlobalUserrights',
20 - 'version' => '1.0.1',
 20+ 'version' => '1.0.2',
2121 'author' => 'Nathaniel Herman',
2222 'description' => 'Easy [[Special:GlobalUserRights|global user rights]] administration',
2323 'descriptionmsg' => 'gur-desc',
@@ -51,10 +51,6 @@
5252 * @return array of global groups
5353 */
5454 function efGURgetGroups( $user ) {
55 - global $egGUGroups;
56 - if ( $egGUGroups )
57 - return $egGUGroups;
58 -
5955 if ( $user instanceof User ) {
6056 $uid = $user->mId;
6157 } else {
@@ -63,7 +59,7 @@
6460 }
6561
6662 $dbw = wfGetDB( DB_MASTER );
67 - $egGUGroups = array();
 63+ $groups = array();
6864
6965 $res = $dbw->select( 'global_user_groups',
7066 array( 'gug_group' ),
@@ -71,12 +67,12 @@
7268 );
7369
7470 while( $row = $dbw->fetchObject( $res ) ) {
75 - $egGUGroups[] = $row->gug_group;
 71+ $groups[] = $row->gug_group;
7672 }
7773
7874 $dbw->freeResult( $res );
7975
80 - return $egGUGroups;
 76+ return $groups;
8177
8278 }
8379

Status & tagging log