Update console

This commit is contained in:
Romain Neutron
2012-10-02 13:10:47 +02:00
parent ec40ce3d49
commit b0ffcc4f54
3 changed files with 8 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ class module_console_systemClearCache extends Command
$filesystem->remove($finder); $filesystem->remove($finder);
if (setup::is_installed()) { if ($this->container['phraseanet.configuration']->isInstalled()) {
$this->getService('phraseanet.cache-service')->flushAll(); $this->getService('phraseanet.cache-service')->flushAll();
} }

View File

@@ -43,7 +43,7 @@ class module_console_systemConfigCheck extends Command
$ok = true; $ok = true;
if (setup::is_installed()) { if ($this->container['phraseanet.configuration']->isInstalled()) {
$registry = $this->container['phraseanet.registry']; $registry = $this->container['phraseanet.registry'];
$output->writeln(_('*** CHECK BINARY CONFIGURATION ***')); $output->writeln(_('*** CHECK BINARY CONFIGURATION ***'));

View File

@@ -70,13 +70,17 @@ class module_console_systemUpgrade extends Command
try { try {
$output->write('<info>Upgrading...</info>', true); $output->write('<info>Upgrading...</info>', true);
$this->container['phraseanet.registry'] = new \Setup_Registry();
if (count(User_Adapter::get_wrong_email_users($this->container)) > 0) { if (count(User_Adapter::get_wrong_email_users($this->container)) > 0) {
return $output->writeln(sprintf('<error>You have to fix your database before upgrade with the system:mailCheck command </error>')); return $output->writeln(sprintf('<error>You have to fix your database before upgrade with the system:mailCheck command </error>'));
} }
$upgrader = new Setup_Upgrade($this->getService('phraseanet.appbox'), $input->getOption('force')); $upgrader = new Setup_Upgrade($this->container, $input->getOption('force'));
$this->getService('phraseanet.appbox')->forceUpgrade($upgrader); $this->getService('phraseanet.appbox')->forceUpgrade($upgrader, $this->container);
$this->container['phraseanet.registry'] = new \registry($this->container);
foreach ($upgrader->getRecommendations() as $recommendation) { foreach ($upgrader->getRecommendations() as $recommendation) {
list($message, $command) = $recommendation; list($message, $command) = $recommendation;