From: Platonides Date: Sat, 4 Sep 2010 18:31:37 +0000 (+0000) Subject: Make happy check-vars. This shows it that getQuery() returns an ApiQuery (more specif... X-Git-Tag: 1.31.0-rc.0~35148 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=925c6d0c36c540b92f5c61f69d9f7b374eea895d;p=lhc%2Fweb%2Fwiklou.git Make happy check-vars. This shows it that getQuery() returns an ApiQuery (more specifically, that getQuery() doesn't return an article) --- diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 19790d4255..691dfea4f6 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -40,7 +40,7 @@ abstract class ApiQueryBase extends ApiBase { private $mQueryModule, $mDb, $tables, $where, $fields, $options, $join_conds; - public function __construct( $query, $moduleName, $paramPrefix = '' ) { + public function __construct( ApiQuery $query, $moduleName, $paramPrefix = '' ) { parent::__construct( $query->getMain(), $moduleName, $paramPrefix ); $this->mQueryModule = $query; $this->mDb = null; @@ -361,7 +361,8 @@ abstract class ApiQueryBase extends ApiBase { */ protected function getDB() { if ( is_null( $this->mDb ) ) { - $this->mDb = $this->getQuery()->getDB(); + $apiQuery = $this->getQuery(); + $this->mDb = $apiQuery->getDB(); } return $this->mDb; }