From: Umherirrender Date: Fri, 7 Jun 2019 14:28:31 +0000 (+0200) Subject: watcheditem: Do not create the same TitleValue object twice X-Git-Tag: 1.34.0-rc.0~1470^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=4aec6e80eea54dc6f26a0cec5b39c078d0813fa4 watcheditem: Do not create the same TitleValue object twice Minor optimization in getWatchedItemsForUser(). Follows-up 7c12727fff0. Change-Id: I29f40f2c09c334eea33c7aaf351e1f1a93de9c13 --- 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 ) );