Do not log user rights change that didn't change anything
This commit is contained in:
parent
0645294f99
commit
d292e7b100
2 changed files with 13 additions and 11 deletions
|
|
@ -293,7 +293,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 12489) Special:Userrights listed in restricted section again
|
||||
* (bug 12553) Fixed invalid XHTML in edit conflict screen
|
||||
* (bug 12505) Fixed section=0 with action=raw
|
||||
|
||||
* Do not log user rights change that didn't change anything
|
||||
|
||||
== Parser changes in 1.12 ==
|
||||
|
||||
|
|
|
|||
|
|
@ -136,17 +136,19 @@ class UserrightsPage extends SpecialPage {
|
|||
wfRunHooks( 'UserRights', array( &$user, $addgroup, $removegroup ) );
|
||||
}
|
||||
|
||||
$log = new LogPage( 'rights' );
|
||||
if( $addgroup or $removegroup ) {
|
||||
$log = new LogPage( 'rights' );
|
||||
|
||||
global $wgRequest;
|
||||
$log->addEntry( 'rights',
|
||||
$user->getUserPage(),
|
||||
$wgRequest->getText( 'user-reason' ),
|
||||
array(
|
||||
$this->makeGroupNameList( $oldGroups ),
|
||||
$this->makeGroupNameList( $newGroups )
|
||||
)
|
||||
);
|
||||
global $wgRequest;
|
||||
$log->addEntry( 'rights',
|
||||
$user->getUserPage(),
|
||||
$wgRequest->getText( 'user-reason' ),
|
||||
array(
|
||||
$this->makeGroupNameList( $oldGroups ),
|
||||
$this->makeGroupNameList( $newGroups )
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue