From 2bfdb5da848be0a2286fadab6d372e17837e40ee Mon Sep 17 00:00:00 2001 From: addshore Date: Tue, 15 Mar 2016 16:08:45 +0000 Subject: [PATCH] Fix ApiQueryInfo break from use of WatchedItemStore Fixes an issue introduced in: I5a465773599cce9f8c9e94847cede6d12282c827 The new code now returns all targets even when 0 watcher have been found. This patch adjusts the api to expect that. Bug: T129482 Change-Id: Ie84e6feaa42db1bc7a1f89b56aed37dd7fe95ea4 --- includes/api/ApiQueryInfo.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index a3c98ed5e2..3aa0122d7d 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -453,10 +453,8 @@ class ApiQueryInfo extends ApiQueryBase { } if ( $this->fld_watchers ) { - if ( isset( $this->watchers[$ns][$dbkey] ) ) { + if ( $this->watchers[$ns][$dbkey] !== 0 || $this->showZeroWatchers ) { $pageInfo['watchers'] = $this->watchers[$ns][$dbkey]; - } elseif ( $this->showZeroWatchers ) { - $pageInfo['watchers'] = 0; } } -- 2.20.1