r92762 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92761‎ | r92762 | r92763 >
Date:18:03, 21 July 2011
Author:catrope
Status:ok
Tags:
Comment:
Fix r78824 after some misunderstandings in the CR comments. The querypage API module was checking for disabled status and setting the 'disabled' attribute in the output, but would then happily proceed to call doQuery() on a disabled query page.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryQueryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryQueryPage.php
@@ -97,6 +97,11 @@
9898 }
9999 }
100100 $result->addValue( array( 'query' ), $this->getModuleName(), $r );
 101+
 102+ if ( $qp->isCached() && !$qp->isCacheable() ) {
 103+ // Disabled query page, don't run the query
 104+ return;
 105+ }
101106
102107 $res = $qp->doQuery( $params['limit'] + 1, $params['offset'] );
103108 $count = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r93426MFT to REL1_18...hashar20:20, 28 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78824(bug 14869) Add API module for accessing QueryPage-based special pages. Took ...catrope20:35, 22 December 2010

Status & tagging log