public function __construct($query, $moduleName) {
parent :: __construct($query, $moduleName, 'ai');
+ $this->mRepo = RepoGroup::singleton()->getLocalRepo();
+ }
+
+ /**
+ * Overide parent method to make sure to make sure the repo's DB is used
+ * which may not necesarilly be the same as the local DB.
+ *
+ * TODO: allow querying non-local repos.
+ */
+ protected function getDB() {
+ return $this->mRepo->getSlaveDB();
}
public function execute() {
}
private function run($resultPageSet = null) {
- $repo = RepoGroup::singleton()->getLocalRepo();
+ $repo = $this->mRepo;
if ( !$repo instanceof LocalRepo )
$this->dieUsage('Local file repository does not support querying all images', 'unsupportedrepo');