From: Aryeh Gregor Date: Thu, 10 Jan 2008 02:28:58 +0000 (+0000) Subject: Do not log user rights change that didn't change anything X-Git-Tag: 1.31.0-rc.0~50076 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=d292e7b100c786e15d2c67fdee19c3ce0368c56c;p=lhc%2Fweb%2Fwiklou.git Do not log user rights change that didn't change anything --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5d74b846e8..fa39373945 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index 40fe55a5e8..4b0a50a6b6 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -136,17 +136,19 @@ class UserrightsPage extends SpecialPage { wfRunHooks( 'UserRights', array( &$user, $addgroup, $removegroup ) ); } - $log = new LogPage( 'rights' ); - - global $wgRequest; - $log->addEntry( 'rights', - $user->getUserPage(), - $wgRequest->getText( 'user-reason' ), - array( - $this->makeGroupNameList( $oldGroups ), - $this->makeGroupNameList( $newGroups ) - ) - ); + 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 ) + ) + ); + } } /**