Make happy check-vars. This shows it that getQuery() returns an ApiQuery (more specif...
authorPlatonides <platonides@users.mediawiki.org>
Sat, 4 Sep 2010 18:31:37 +0000 (18:31 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 4 Sep 2010 18:31:37 +0000 (18:31 +0000)
includes/api/ApiQueryBase.php

index 19790d4..691dfea 100644 (file)
@@ -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;
        }