From 4aec6e80eea54dc6f26a0cec5b39c078d0813fa4 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 7 Jun 2019 16:28:31 +0200 Subject: [PATCH] watcheditem: Do not create the same TitleValue object twice Minor optimization in getWatchedItemsForUser(). Follows-up 7c12727fff0. Change-Id: I29f40f2c09c334eea33c7aaf351e1f1a93de9c13 --- includes/watcheditem/WatchedItemStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index eed0b6cd60..60c1790860 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -641,7 +641,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac // @todo: Should we add these to the process cache? $watchedItems[] = new WatchedItem( $user, - new TitleValue( (int)$row->wl_namespace, $row->wl_title ), + $target, $this->getLatestNotificationTimestamp( $row->wl_notificationtimestamp, $user, $target ) ); -- 2.20.1