Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | |
42 | 42 | private $mQueryModule, $mDb, $tables, $where, $fields, $options, $join_conds; |
43 | 43 | |
44 | | - public function __construct( $query, $moduleName, $paramPrefix = '' ) { |
| 44 | + public function __construct( ApiQuery $query, $moduleName, $paramPrefix = '' ) { |
45 | 45 | parent::__construct( $query->getMain(), $moduleName, $paramPrefix ); |
46 | 46 | $this->mQueryModule = $query; |
47 | 47 | $this->mDb = null; |
— | — | @@ -361,7 +361,8 @@ |
362 | 362 | */ |
363 | 363 | protected function getDB() { |
364 | 364 | if ( is_null( $this->mDb ) ) { |
365 | | - $this->mDb = $this->getQuery()->getDB(); |
| 365 | + $apiQuery = $this->getQuery(); |
| 366 | + $this->mDb = $apiQuery->getDB(); |
366 | 367 | } |
367 | 368 | return $this->mDb; |
368 | 369 | } |