r99377 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99376‎ | r99377 | r99378 >
Date:20:50, 9 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
do not run query when nothing is asked for
Modified paths:
  • /trunk/extensions/Contest/api/ApiContestQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/api/ApiContestQuery.php
@@ -51,8 +51,11 @@
5252 */
5353 public function execute() {
5454 $params = $this->getParams();
55 - $results = $this->getResults( $params, $this->getConditions( $params ) );
56 - $this->addResults( $params, $results );
 55+
 56+ if ( count( $params['props'] ) > 0 ) {
 57+ $results = $this->getResults( $params, $this->getConditions( $params ) );
 58+ $this->addResults( $params, $results );
 59+ }
5760 }
5861
5962 /**

Status & tagging log