RC Filters: watch filter highlight
authorStephane Bisson <sbisson@wikimedia.org>
Tue, 2 May 2017 20:09:27 +0000 (16:09 -0400)
committerStephane Bisson <sbisson@wikimedia.org>
Tue, 2 May 2017 20:09:27 +0000 (16:09 -0400)
When checking if lines are 'watchednew' for highlight purposes,
make sure 'rc_timestamp' and 'wl_notificationtimestamp' are truthy.

Bug: T163964
Change-Id: I3cd6cc9835db01229b8d1cc6ccfc371a36709ef2

includes/specialpage/ChangesListSpecialPage.php

index 9074d30..93cc18f 100644 (file)
@@ -415,7 +415,9 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                                                'cssClassSuffix' => 'watchednew',
                                                'isRowApplicableCallable' => function ( $ctx, $rc ) {
                                                        return $rc->getAttribute( 'wl_user' ) &&
-                                                               $rc->getAttribute( 'rc_timestamp' ) > $rc->getAttribute( 'wl_notificationtimestamp' );
+                                                               $rc->getAttribute( 'rc_timestamp' ) &&
+                                                               $rc->getAttribute( 'wl_notificationtimestamp' ) &&
+                                                               $rc->getAttribute( 'rc_timestamp' ) >= $rc->getAttribute( 'wl_notificationtimestamp' );
                                                },
                                        ],
                                        [