[MediaWiki-commits] [Gerrit] mediawiki/core[master]: No longer special case 'patrol' in $wgFilterLogTypes

2017-10-30 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
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 disable 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, 19 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Anomie: Looks good to me, approved



diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index a4ce481..b5ec0d6 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -13,6 +13,8 @@
   temporary variable during the migration period, deprecated since 1.29.
 * $wgLogoHD has been updated to support svg images and uses $wgLogo where
   possible for fallback images such as png.
+* (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 040f1ce..497b86d 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6804,6 +6804,10 @@
 /**
  * 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 so a show/hide link isn't shown on
+ *  Special:Log.
  */
 $wgUseRCPatrol = true;
 
@@ -6835,12 +6839,20 @@
 
 /**
  * Use new page patrolling to check new pages on Special:Newpages
+ *
+ * @note If you disable all patrolling features, you probably also want to
+ *  remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
+ *  Special:Log.
  */
 $wgUseNPPatrol = true;
 
 /**
  * Use file patrolling to check new files on Special:Newfiles
  *
+ * @note If you disable all patrolling features, you probably also want to
+ *  remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
+ *  Special:Log.
+ *
  * @since 1.27
  */
 $wgUseFilePatrol = 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: merged
Gerrit-Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Cenarium 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Zhuyifei1999 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: No longer special case 'patrol' in $wgFilterLogTypes

2017-10-13 Thread Brian Wolff (Code Review)
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 

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