Merge "registration: Avoid double slashes in localBasePath"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 18 Feb 2016 18:48:07 +0000 (18:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 18 Feb 2016 18:48:07 +0000 (18:48 +0000)
includes/api/ApiQueryWatchlist.php

index 7e561cb..db2cf86 100644 (file)
@@ -192,8 +192,11 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        $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'] ) ) {