From 1cc911f01ea15adf086d3949042ed279cdbc108d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 29 Oct 2006 12:11:58 +0000 Subject: [PATCH] * (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. --- RELEASE-NOTES | 3 +++ includes/Article.php | 6 ++++-- includes/DefaultSettings.php | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 391f5b9176..2e51b1c15e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Article.php b/includes/Article.php index 388dec1b19..11eb96632c 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ) ) { diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d2205c11e9..97bf331b8c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; -- 2.20.1