Merge "Reset WatchedItemStore default instance after tests"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 15 Mar 2016 17:18:09 +0000 (17:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 15 Mar 2016 17:18:09 +0000 (17:18 +0000)
includes/api/ApiQueryInfo.php

index a3c98ed..3aa0122 100644 (file)
@@ -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;
                        }
                }