From: Aaron Schulz Date: Tue, 21 May 2019 00:32:41 +0000 (-0700) Subject: watchlist: make getLatestNotificationTimestamp() method use the correct user X-Git-Tag: 1.34.0-rc.0~1643^2 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=43fea930a0f2701afc1db0a354119b8e3b194b23;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ); }