Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1142,8 +1142,8 @@ |
1143 | 1143 | 'rightslog', |
1144 | 1144 | 'rightslogtext', |
1145 | 1145 | 'rightslogentry', |
| 1146 | + 'rightslogentry-autopromote', |
1146 | 1147 | 'rightsnone', |
1147 | | - 'rightsautocomment', |
1148 | 1148 | ), |
1149 | 1149 | 'action' => array( |
1150 | 1150 | 'action-read', |
Index: trunk/phase3/includes/User.php |
— | — | @@ -1128,9 +1128,9 @@ |
1129 | 1129 | $newGroups = array_merge( $oldGroups, $toPromote ); // all groups |
1130 | 1130 | |
1131 | 1131 | $log = new LogPage( 'rights', false /* not in RC */ ); |
1132 | | - $log->addEntry( 'rights', |
| 1132 | + $log->addEntry( 'autopromote', |
1133 | 1133 | $this->getUserPage(), |
1134 | | - wfMsgForContent( 'rightsautocomment' ), |
| 1134 | + '', // no comment |
1135 | 1135 | array( implode( ', ', $oldGroups ), implode( ', ', $newGroups ) ) |
1136 | 1136 | ); |
1137 | 1137 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4846,34 +4846,35 @@ |
4847 | 4847 | * Extensions with custom log types may add to this array. |
4848 | 4848 | */ |
4849 | 4849 | $wgLogActions = array( |
4850 | | - 'block/block' => 'blocklogentry', |
4851 | | - 'block/unblock' => 'unblocklogentry', |
4852 | | - 'block/reblock' => 'reblock-logentry', |
4853 | | - 'protect/protect' => 'protectedarticle', |
4854 | | - 'protect/modify' => 'modifiedarticleprotection', |
4855 | | - 'protect/unprotect' => 'unprotectedarticle', |
4856 | | - 'protect/move_prot' => 'movedarticleprotection', |
4857 | | - 'rights/rights' => 'rightslogentry', |
4858 | | - 'rights/disable' => 'disableaccount-logentry', |
4859 | | - 'delete/delete' => 'deletedarticle', |
4860 | | - 'delete/restore' => 'undeletedarticle', |
4861 | | - 'delete/revision' => 'revdelete-logentry', |
4862 | | - 'delete/event' => 'logdelete-logentry', |
4863 | | - 'upload/upload' => 'uploadedimage', |
4864 | | - 'upload/overwrite' => 'overwroteimage', |
4865 | | - 'upload/revert' => 'uploadedimage', |
4866 | | - 'move/move' => '1movedto2', |
4867 | | - 'move/move_redir' => '1movedto2_redir', |
4868 | | - 'import/upload' => 'import-logentry-upload', |
4869 | | - 'import/interwiki' => 'import-logentry-interwiki', |
4870 | | - 'merge/merge' => 'pagemerge-logentry', |
4871 | | - 'suppress/revision' => 'revdelete-logentry', |
4872 | | - 'suppress/file' => 'revdelete-logentry', |
4873 | | - 'suppress/event' => 'logdelete-logentry', |
4874 | | - 'suppress/delete' => 'suppressedarticle', |
4875 | | - 'suppress/block' => 'blocklogentry', |
4876 | | - 'suppress/reblock' => 'reblock-logentry', |
4877 | | - 'patrol/patrol' => 'patrol-log-line', |
| 4850 | + 'block/block' => 'blocklogentry', |
| 4851 | + 'block/unblock' => 'unblocklogentry', |
| 4852 | + 'block/reblock' => 'reblock-logentry', |
| 4853 | + 'protect/protect' => 'protectedarticle', |
| 4854 | + 'protect/modify' => 'modifiedarticleprotection', |
| 4855 | + 'protect/unprotect' => 'unprotectedarticle', |
| 4856 | + 'protect/move_prot' => 'movedarticleprotection', |
| 4857 | + 'rights/rights' => 'rightslogentry', |
| 4858 | + 'rights/autopromote' => 'rightslogentry-autopromote', |
| 4859 | + 'rights/disable' => 'disableaccount-logentry', |
| 4860 | + 'delete/delete' => 'deletedarticle', |
| 4861 | + 'delete/restore' => 'undeletedarticle', |
| 4862 | + 'delete/revision' => 'revdelete-logentry', |
| 4863 | + 'delete/event' => 'logdelete-logentry', |
| 4864 | + 'upload/upload' => 'uploadedimage', |
| 4865 | + 'upload/overwrite' => 'overwroteimage', |
| 4866 | + 'upload/revert' => 'uploadedimage', |
| 4867 | + 'move/move' => '1movedto2', |
| 4868 | + 'move/move_redir' => '1movedto2_redir', |
| 4869 | + 'import/upload' => 'import-logentry-upload', |
| 4870 | + 'import/interwiki' => 'import-logentry-interwiki', |
| 4871 | + 'merge/merge' => 'pagemerge-logentry', |
| 4872 | + 'suppress/revision' => 'revdelete-logentry', |
| 4873 | + 'suppress/file' => 'revdelete-logentry', |
| 4874 | + 'suppress/event' => 'logdelete-logentry', |
| 4875 | + 'suppress/delete' => 'suppressedarticle', |
| 4876 | + 'suppress/block' => 'blocklogentry', |
| 4877 | + 'suppress/reblock' => 'reblock-logentry', |
| 4878 | + 'patrol/patrol' => 'patrol-log-line', |
4878 | 4879 | ); |
4879 | 4880 | |
4880 | 4881 | /** |
Index: trunk/phase3/includes/Autopromote.php |
— | — | @@ -46,13 +46,13 @@ |
47 | 47 | |
48 | 48 | if ( isset( $wgAutopromoteOnce[$event] ) && count( $wgAutopromoteOnce[$event] ) ) { |
49 | 49 | $currentGroups = $user->getGroups(); |
| 50 | + $formerGroups = $user->getFormerGroups(); |
50 | 51 | foreach ( $wgAutopromoteOnce[$event] as $group => $cond ) { |
51 | 52 | // Do not check if the user's already a member |
52 | 53 | if ( in_array( $group, $currentGroups ) ) { |
53 | 54 | continue; |
54 | 55 | } |
55 | 56 | // Do not autopromote if the user has belonged to the group |
56 | | - $formerGroups = $user->getFormerGroups(); |
57 | 57 | if ( in_array( $group, $formerGroups ) ) { |
58 | 58 | continue; |
59 | 59 | } |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | $rv = wfMsgHtml( $wgLogActions[$key] ); |
219 | 219 | } else { |
220 | 220 | $titleLink = self::getTitleLink( $type, $skin, $title, $params ); |
221 | | - if( $key == 'rights/rights' ) { |
| 221 | + if( preg_match( '/^rights\/(rights|autopromote)/', $key ) ) { |
222 | 222 | if( $skin ) { |
223 | 223 | $rightsnone = wfMsg( 'rightsnone' ); |
224 | 224 | foreach ( $params as &$param ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1978,11 +1978,11 @@ |
1979 | 1979 | 'right-sendemail' => 'Send e-mail to other users', |
1980 | 1980 | |
1981 | 1981 | # User rights log |
1982 | | -'rightslog' => 'User rights log', |
1983 | | -'rightslogtext' => 'This is a log of changes to user rights.', |
1984 | | -'rightslogentry' => 'changed group membership for $1 from $2 to $3', |
1985 | | -'rightsnone' => '(none)', |
1986 | | -'rightsautocomment' => 'automatically promoted', |
| 1982 | +'rightslog' => 'User rights log', |
| 1983 | +'rightslogtext' => 'This is a log of changes to user rights.', |
| 1984 | +'rightslogentry' => 'changed group membership for $1 from $2 to $3', |
| 1985 | +'rightslogentry-autopromote' => 'was automatically promoted from $2 to $3', |
| 1986 | +'rightsnone' => '(none)', |
1987 | 1987 | |
1988 | 1988 | # Associated actions - in the sentence "You do not have permission to X" |
1989 | 1989 | 'action-read' => 'read this page', |