* (bug 3224) Allow minor edits by bots to skip new message notification on
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 29 Oct 2006 12:11:58 +0000 (12:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 29 Oct 2006 12:11:58 +0000 (12:11 +0000)
  user talk pages. This can be disabled by adjusting the 'nominornewtalk'
  permission. Patch by Werdna.

RELEASE-NOTES
includes/Article.php
includes/DefaultSettings.php

index 391f5b9..2e51b1c 100644 (file)
@@ -97,6 +97,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added 'UndeleteShowRevision' hook in Special:Undelete
 * Error message on attempt to view invalid or missing deleted revisions
 * Remove unsightly "_" from namespace in Special:Allpages, Special:Prefixindex
+* (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.
 
 
 == Languages updated ==
index 388dec1..11eb966 100644 (file)
@@ -2140,8 +2140,10 @@ class Article {
 
                # If this is another user's talk page, update newtalk
                # Don't do this if $changed = false otherwise some idiot can null-edit a
-               # load of user talk pages and piss people off
-               if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getTitleKey() && $changed ) {
+               # load of user talk pages and piss people off, nor if it's a minor edit
+               # by a properly-flagged bot.
+               if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getTitleKey() && $changed
+                       && !($minoredit && $wgUser->isAllowed('nominornewtalk') ) ) {
                        if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) {
                                $other = User::newFromName( $shortTitle );
                                if( is_null( $other ) && User::isIP( $shortTitle ) ) {
index d2205c1..97bf331 100644 (file)
@@ -919,6 +919,7 @@ $wgGroupPermissions['emailconfirmed']['emailconfirmed'] = true;
 // from various log pages by default
 $wgGroupPermissions['bot'  ]['bot']             = true;
 $wgGroupPermissions['bot'  ]['autoconfirmed']   = true;
+$wgGroupPermissions['bot'  ]['nominornewtalk']  = true;
 
 // Most extra permission abilities go to this group
 $wgGroupPermissions['sysop']['block']           = true;