jenkins-bot has submitted this change and it was merged.
Change subject: Add setting wgLogAutopatrol to toggle logging of autopatrol
actions
......................................................................
Add setting wgLogAutopatrol to toggle logging of autopatrol actions
Per bug 47415, this is needed for Wikidata and could be useful for
other wikis, as well.
Bug: 47415
Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330
---
M RELEASE-NOTES-1.22
M includes/DefaultSettings.php
M includes/logging/PatrolLog.php
3 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ded2cee..1591fa9 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -27,6 +27,8 @@
* $wgJsMimeType is no longer used by core. Most usage has been removed since
HTML output is now exclusively HTML5.
* $wgDBOracleDRCP added. True enables persistent connection with DRCP on
Oracle.
+* $wgLogAutopatrol added to allow disabling logging of autopatrol edits in the
logging table.
+ default for $wgLogAutopatrol is true.
=== New features in 1.22 ===
* (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements
and attributes.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 1b56547..b86de8c 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5147,6 +5147,9 @@
/** Use new page patrolling to check new pages on Special:Newpages */
$wgUseNPPatrol = true;
+/** Log autopatrol actions to the log table */
+$wgLogAutopatrol = true;
+
/** Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */
$wgFeed = true;
diff --git a/includes/logging/PatrolLog.php b/includes/logging/PatrolLog.php
index 911fffc..bb76d5a 100644
--- a/includes/logging/PatrolLog.php
+++ b/includes/logging/PatrolLog.php
@@ -38,6 +38,13 @@
* @return bool
*/
public static function record( $rc, $auto = false, User $user = null ) {
+ global $wgLogAutopatrol;
+
+ // do not log autopatrolled edits if setting disables it
+ if ( $auto && !$wgLogAutopatrol ) {
+ return false;
+ }
+
if ( !$rc instanceof RecentChange ) {
$rc = RecentChange::newFromId( $rc );
if ( !is_object( $rc ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/62785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic999454d001c38dea08746d1e8184f0163cb7330
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits