Index: trunk/extensions/GlobalUserrights/GlobalUserrights_body.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * @ingroup Extensions |
8 | 8 | */ |
9 | 9 | |
10 | | -if( !defined( 'MEDIAWIKI' ) ) die(); |
| 10 | +if (!defined('MEDIAWIKI')) die(); |
11 | 11 | |
12 | 12 | class GlobalUserrights extends UserrightsPage { |
13 | 13 | |
Index: trunk/extensions/GlobalUserrights/GlobalUserrights.php |
— | — | @@ -10,13 +10,13 @@ |
11 | 11 | * @note Some of the code based on stuff by Lukasz 'TOR' Garczewski, as well as SpecialUserrights.php and CentralAuth |
12 | 12 | */ |
13 | 13 | |
14 | | -if( !defined( 'MEDIAWIKI' ) ) die(); |
| 14 | +if (!defined('MEDIAWIKI')) die(); |
15 | 15 | |
16 | 16 | // Extension credits |
17 | 17 | $wgExtensionCredits['specialpage'][] = array( |
18 | 18 | 'name' => 'GlobalUserrights', |
19 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:GlobalUserrights', |
20 | | - 'version' => '1.0', |
| 20 | + 'version' => '1.0.1', |
21 | 21 | 'author' => 'Nathaniel Herman', |
22 | 22 | 'description' => 'Easy [[Special:GlobalUserRights|global user rights]] administration', |
23 | 23 | 'descriptionmsg' => 'gur-desc', |
— | — | @@ -106,9 +106,9 @@ |
107 | 107 | $dbr = wfGetDB( DB_SLAVE ); |
108 | 108 | list( $gug ) = $dbr->tableNamesN( 'global_user_groups' ); |
109 | 109 | $query['tables'] .= "LEFT JOIN $gug ON user_id=gug_user"; |
110 | | - $query['fields'][2] = 'COUNT(ug_group) + COUNT(gug_group) AS numgroups'; |
| 110 | + $query['fields'][3] = 'COUNT(ug_group) + COUNT(gug_group) AS numgroups'; |
111 | 111 | // kind of yucky statement, I blame MySQL 5.0.13 http://bugs.mysql.com/bug.php?id=15610 |
112 | | - $query['fields'][3] = 'GREATEST(COALESCE(ug_group, gug_group), COALESCE(gug_group, ug_group)) AS singlegroup'; |
| 112 | + $query['fields'][4] = 'GREATEST(COALESCE(ug_group, gug_group), COALESCE(gug_group, ug_group)) AS singlegroup'; |
113 | 113 | |
114 | 114 | // if there's a $query['conds']['ug_group'], destroy it and make one that accounts for gug_group |
115 | 115 | if( isset( $query['conds']['ug_group'] ) ) { |