From 43fea930a0f2701afc1db0a354119b8e3b194b23 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 20 May 2019 17:32:41 -0700 Subject: [PATCH] watchlist: make getLatestNotificationTimestamp() method use the correct user This uses the proper stash entry and also fits within the 3 item process cache in WatchedItemStore that contains last-visit maps for users. Follows-up 588a46468252, which added use of the stash optimisation but wrongly keyed against rc_actor/rc_user instead of $this->getUser, which means that unlike the DB 'wl_notificationtimestamp' field (which is result of joining against watchlist and user via $this->getUser), it was now reading the cache key for a different user instead of the user that is viewing their watchlist. Bug: T218511 Bug: T223310 Change-Id: I5c4dd2c7384f7681cee21fb2caf10d4d4b64c724 --- includes/specials/SpecialWatchlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 56f5c8fdac..2443470ef5 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -880,7 +880,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { private function getLatestNotificationTimestamp( RecentChange $rc ) { return $this->watchStore->getLatestNotificationTimestamp( $rc->getAttribute( 'wl_notificationtimestamp' ), - $rc->getPerformer(), + $this->getUser(), $rc->getTitle() ); } -- 2.20.1