Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384197 )

Change subject: No longer special case 'patrol' in $wgFilterLogTypes
......................................................................

No longer special case 'patrol' in $wgFilterLogTypes

Previously, if you did not have the right to patrol/view patrolmarks,
you were not allowed to filter Special:Log to remove autopatrol
entries.

Now if wikiadmins want to disbale the filtering, they have to
directly change the config value.

This was stupid because:
* Users without patrol rights are just as likely to not care about
  autopatrol spam as users with the priv.
* Sometimes wikiadmins want to hide old patrol log entries even
  after they disabled the patrol feature.

It should be noted there have been two previously attempts at fixing
this issue that didn't go anywhere:
* I9de17fc197a06402a4999a9fb792b86657641f76
* I88448ca0f09069943fd514a5b8213dfdafa57299

Bug: T44246
Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
---
M RELEASE-NOTES-1.31
M includes/DefaultSettings.php
M includes/logging/LogPager.php
3 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/384197/1

diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index 3fd1fc8..59711cb 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -6,6 +6,8 @@
 production.
 
 === Configuration changes in 1.31 ===
+* (T44246) $wgFilterLogTypes will no longer ignore patrol when user does
+  not have the right to mark things patrolled.
 * …
 
 === New features in 1.31 ===
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 780976a..80d45cd 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6803,6 +6803,9 @@
 /**
  * Use RC Patrolling to check for vandalism (from recent changes and 
watchlists)
  * New pages and new files are included.
+ *
+ * @note If you disable all patrolling features, you probably also want to
+ *  remove patrol from $wgFilterLogTypes.
  */
 $wgUseRCPatrol = true;
 
diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php
index f79fcfa..df432e1 100644
--- a/includes/logging/LogPager.php
+++ b/includes/logging/LogPager.php
@@ -97,13 +97,11 @@
                        return $filters;
                }
                foreach ( $wgFilterLogTypes as $type => $default ) {
-                       // Avoid silly filtering
-                       if ( $type !== 'patrol' || 
$this->getUser()->useNPPatrol() ) {
-                               $hide = $this->getRequest()->getInt( 
"hide_{$type}_log", $default );
-                               $filters[$type] = $hide;
-                               if ( $hide ) {
-                                       $this->mConds[] = 'log_type != ' . 
$this->mDb->addQuotes( $type );
-                               }
+                       $hide = $this->getRequest()->getInt( 
"hide_{$type}_log", $default );
+
+                       $filters[$type] = $hide;
+                       if ( $hide ) {
+                               $this->mConds[] = 'log_type != ' . 
$this->mDb->addQuotes( $type );
                        }
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/384197
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <bawolff...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to