watcheditem: Do not create the same TitleValue object twice
authorUmherirrender <umherirrender_de.wp@web.de>
Fri, 7 Jun 2019 14:28:31 +0000 (16:28 +0200)
committerKrinkle <krinklemail@gmail.com>
Mon, 10 Jun 2019 20:14:18 +0000 (20:14 +0000)
Minor optimization in getWatchedItemsForUser(). Follows-up 7c12727fff0.

Change-Id: I29f40f2c09c334eea33c7aaf351e1f1a93de9c13

includes/watcheditem/WatchedItemStore.php

index eed0b6c..60c1790 100644 (file)
@@ -641,7 +641,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                        // @todo: Should we add these to the process cache?
                        $watchedItems[] = new WatchedItem(
                                $user,
                        // @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 )
                        );
                                $this->getLatestNotificationTimestamp(
                                        $row->wl_notificationtimestamp, $user, $target )
                        );