watchlist: make getLatestNotificationTimestamp() method use the correct user
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 21 May 2019 00:32:41 +0000 (17:32 -0700)
committerKrinkle <krinklemail@gmail.com>
Tue, 21 May 2019 00:49:36 +0000 (00:49 +0000)
commit43fea930a0f2701afc1db0a354119b8e3b194b23
tree9bd29f7c4ec64578a7a6f2e136b2a2b3d4b5d130
parent1b9f001cebfacb553101b9c9405e4ea952e02ae8
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