Fix r78824 after some misunderstandings in the CR comments. The querypage API module...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 21 Jul 2011 18:03:25 +0000 (18:03 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 21 Jul 2011 18:03:25 +0000 (18:03 +0000)
includes/api/ApiQueryQueryPage.php

index c881a8c..e259fea 100644 (file)
@@ -97,6 +97,11 @@ class ApiQueryQueryPage extends ApiQueryGeneratorBase {
                        }
                }
                $result->addValue( array( 'query' ), $this->getModuleName(), $r );
+               
+               if ( $qp->isCached() && !$qp->isCacheable() ) {
+                       // Disabled query page, don't run the query
+                       return;
+               }
 
                $res = $qp->doQuery( $params['limit'] + 1, $params['offset'] );
                $count = 0;