From: addshore Date: Thu, 14 Apr 2016 08:15:18 +0000 (+0100) Subject: Use WatchedItemStore for SP:RC watchers count X-Git-Tag: 1.31.0-rc.0~7292^2 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=397dfd13f7856771297408526f66367b9d135b8e;p=lhc%2Fweb%2Fwiklou.git Use WatchedItemStore for SP:RC watchers count Bug: T132568 Change-Id: Ic6a0ee77cb767c6f8e4a8d359feb0405c9a990d1 --- diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index de773800ac..8398989488 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -344,14 +344,8 @@ class SpecialRecentChanges extends ChangesListSpecialPage { if ( $showWatcherCount && $obj->rc_namespace >= 0 ) { if ( !isset( $watcherCache[$obj->rc_namespace][$obj->rc_title] ) ) { $watcherCache[$obj->rc_namespace][$obj->rc_title] = - $dbr->selectField( - 'watchlist', - 'COUNT(*)', - [ - 'wl_namespace' => $obj->rc_namespace, - 'wl_title' => $obj->rc_title, - ], - __METHOD__ . '-watchers' + WatchedItemStore::getDefaultInstance()->countWatchers( + new TitleValue( (int)$obj->rc_namespace, $obj->rc_title ) ); } $rc->numberofWatchingusers = $watcherCache[$obj->rc_namespace][$obj->rc_title];