Update console commands

This commit is contained in:
Romain Neutron
2012-09-21 14:53:04 +02:00
parent 0343baf8ba
commit 06b4e6bc6f
13 changed files with 195 additions and 214 deletions

View File

@@ -49,7 +49,6 @@ class module_console_checkExtension extends Command
return 1;
}
$Core = $this->getService('phraseanet.core');
$appbox = $this->getService('phraseanet.appbox');
$registry = $appbox->get_registry();
@@ -57,7 +56,7 @@ class module_console_checkExtension extends Command
$usrId = $input->getArgument('usr_id');
try {
$TestUser = \User_Adapter::getInstance($usrId, $appbox);
$TestUser = \User_Adapter::getInstance($usrId, $this->container);
} catch (\Exception $e) {
$output->writeln("<error>Wrong user !</error>");
@@ -78,7 +77,7 @@ class module_console_checkExtension extends Command
$output->writeln("<info>$function</info>");
}
$configuration = $Core->getConfiguration();
$configuration = $this->getService('phraseanet.configuration');
$choosenConnection = $configuration->getPhraseanet()->get('database');
$connexion = $configuration->getConnexion($choosenConnection);
$hostname = $connexion->get('host');
@@ -157,7 +156,7 @@ class module_console_checkExtension extends Command
$tbases[$kbase]["searchcoll"] = $tcoll;
$tbases[$kbase]["mask_xor"] = $tbases[$kbase]["mask_and"] = 0;
$qp = new searchEngine_adapter_phrasea_queryParser();
$qp = new searchEngine_adapter_phrasea_queryParser($this->container);
$treeq = $qp->parsequery($input->getOption('query'));
$arrayq = $qp->makequery($treeq);