Index: trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | |
222 | 222 | // Log it |
223 | 223 | if (!(count($addRights)==0 && count($removeRights)==0)) |
224 | | - $this->addLogEntry( $group, $oldRights, $newRights, $reason ); |
| 224 | + $this->addLogEntry( $group, $addRights, $removeRights, $reason ); |
225 | 225 | |
226 | 226 | $this->invalidateRightsCache( $group ); |
227 | 227 | |
— | — | @@ -258,23 +258,25 @@ |
259 | 259 | LogEventsList::showLogExtract( $output, 'gblrights', $title->getPrefixedText() ); |
260 | 260 | } |
261 | 261 | |
262 | | - function addLogEntry( $group, $oldRights, $newRights, $reason ) { |
| 262 | + function addLogEntry( $group, $addRights, $removeRights, $reason ) { |
263 | 263 | global $wgRequest; |
264 | 264 | |
265 | 265 | $log = new LogPage( 'gblrights' ); |
| 266 | + |
| 267 | + $added = |
266 | 268 | |
267 | | - $log->addEntry( 'groupperms', |
| 269 | + $log->addEntry( 'groupperms2', |
268 | 270 | SpecialPage::getTitleFor( 'GlobalUsers', $group ), |
269 | 271 | $reason, |
270 | 272 | array( |
271 | | - $this->makeRightsList( $oldRights ), |
272 | | - $this->makeRightsList( $newRights ) |
| 273 | + $this->makeRightsList( $addRights ), |
| 274 | + $this->makeRightsList( $removeRights ) |
273 | 275 | ) |
274 | 276 | ); |
275 | 277 | } |
276 | 278 | |
277 | 279 | function makeRightsList( $ids ) { |
278 | | - return implode( ', ', $ids ); |
| 280 | + return (bool)count($ids) ? implode( ', ', $ids ) : wfMsg( 'rightsnone' ); |
279 | 281 | } |
280 | 282 | |
281 | 283 | function invalidateRightsCache( $group ) { |
Index: trunk/extensions/CentralAuth/CentralAuth.php |
— | — | @@ -199,3 +199,4 @@ |
200 | 200 | $wgLogHeaders['gblrights'] = 'centralauth-rightslog-header'; |
201 | 201 | $wgLogActions['gblrights/usergroups'] = 'centralauth-rightslog-entry-usergroups'; |
202 | 202 | $wgLogActions['gblrights/groupperms'] = 'centralauth-rightslog-entry-groupperms'; |
| 203 | +$wgLogActions['gblrights/groupperms2'] = 'centralauth-rightslog-entry-groupperms2'; |
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php |
— | — | @@ -234,6 +234,7 @@ |
235 | 235 | 'centralauth-rightslog-name' => 'Global rights log', |
236 | 236 | 'centralauth-rightslog-entry-usergroups' => 'changed global group membership for $1 from $2 to $3', |
237 | 237 | 'centralauth-rightslog-entry-groupperms' => 'changed group permissions for $1 from $2 to $3', |
| 238 | + 'centralauth-rightslog-entry-groupperms' => 'changed group permissions for $1. Added $2; Removed $3', |
238 | 239 | 'centralauth-rightslog-header' => 'This log contains operations on global groups: membership and permissions changes', |
239 | 240 | |
240 | 241 | // Global group membership |