r17281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17280‎ | r17281 | r17282 >
Date:12:11, 29 October 2006
Author:brion
Status:old
Tags:
Comment:
* (bug 3224) Allow minor edits by bots to skip new message notification on
user talk pages. This can be disabled by adjusting the 'nominornewtalk'
permission. Patch by Werdna.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2140,8 +2140,10 @@
21412141
21422142 # If this is another user's talk page, update newtalk
21432143 # Don't do this if $changed = false otherwise some idiot can null-edit a
2144 - # load of user talk pages and piss people off
2145 - if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getTitleKey() && $changed ) {
 2144+ # load of user talk pages and piss people off, nor if it's a minor edit
 2145+ # by a properly-flagged bot.
 2146+ if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getTitleKey() && $changed
 2147+ && !($minoredit && $wgUser->isAllowed('nominornewtalk') ) ) {
21462148 if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) {
21472149 $other = User::newFromName( $shortTitle );
21482150 if( is_null( $other ) && User::isIP( $shortTitle ) ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -919,6 +919,7 @@
920920 // from various log pages by default
921921 $wgGroupPermissions['bot' ]['bot'] = true;
922922 $wgGroupPermissions['bot' ]['autoconfirmed'] = true;
 923+$wgGroupPermissions['bot' ]['nominornewtalk'] = true;
923924
924925 // Most extra permission abilities go to this group
925926 $wgGroupPermissions['sysop']['block'] = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -97,6 +97,9 @@
9898 * Added 'UndeleteShowRevision' hook in Special:Undelete
9999 * Error message on attempt to view invalid or missing deleted revisions
100100 * Remove unsightly "_" from namespace in Special:Allpages, Special:Prefixindex
 101+* (bug 3224) Allow minor edits by bots to skip new message notification on
 102+ user talk pages. This can be disabled by adjusting the 'nominornewtalk'
 103+ permission. Patch by Werdna.
101104
102105
103106 == Languages updated ==