Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/268395
Change subject: ApiQueryWatchlist: wlshow=unread should filter revisions, not
pages
......................................................................
ApiQueryWatchlist: wlshow=unread should filter revisions, not pages
It's currently showing all relevant revisions from pages with at least
one unread revision, where it would be more sensible for it to show just
the unread revisions. Something similar applies to wlshow=!unread.
Bug: T125729
Change-Id: I552901efb98081af9a1a677f4403a2a1a73bd94f
---
M includes/api/ApiQueryWatchlist.php
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/95/268395/1
diff --git a/includes/api/ApiQueryWatchlist.php
b/includes/api/ApiQueryWatchlist.php
index ffbd75a..72b2c46 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -192,8 +192,11 @@
$this->addWhereIf( 'rc_user != 0', isset(
$show['!anon'] ) );
$this->addWhereIf( 'rc_patrolled = 0', isset(
$show['!patrolled'] ) );
$this->addWhereIf( 'rc_patrolled != 0', isset(
$show['patrolled'] ) );
- $this->addWhereIf( 'wl_notificationtimestamp IS NOT
NULL', isset( $show['unread'] ) );
- $this->addWhereIf( 'wl_notificationtimestamp IS NULL',
isset( $show['!unread'] ) );
+ $this->addWhereIf( 'rc_timestamp >=
wl_notificationtimestamp', isset( $show['unread'] ) );
+ $this->addWhereIf(
+ 'wl_notificationtimestamp IS NULL OR
rc_timestamp < wl_notificationtimestamp',
+ isset( $show['!unread'] )
+ );
}
if ( !is_null( $params['type'] ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/268395
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I552901efb98081af9a1a677f4403a2a1a73bd94f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits