API: Prevent ApiQueryInfo from trying to set a continue value twice (which will fail...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 12 Feb 2009 17:29:17 +0000 (17:29 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 12 Feb 2009 17:29:17 +0000 (17:29 +0000)
includes/api/ApiQueryInfo.php

index 0ffa1ae..9c87b77 100644 (file)
@@ -435,6 +435,7 @@ class ApiQueryInfo extends ApiQueryBase {
                }
 
                $count = 0;
+               $fit = true;
                ksort($titles); // Ensure they're always in the same order
                foreach ( $titles as $pageid => $title ) {
                        $count++;
@@ -498,8 +499,9 @@ class ApiQueryInfo extends ApiQueryBase {
                }
 
                // Get properties for missing titles if requested
-               if(!is_null($params['token']) || $fld_protection || $fld_talkid || $fld_subjectid ||
-                                                       $fld_url || $fld_readable)
+               if($fit && (!is_null($params['token']) || $fld_protection ||
+                               $fld_talkid || $fld_subjectid || $fld_url ||
+                               $fld_readable))
                {
                        foreach($missing as $pageid => $title) {
                                $count++;