Fix upgrade with a bad databox

This commit is contained in:
Romain Neutron
2011-12-08 17:22:34 +01:00
parent 405f577fa1
commit 9fb986e8f0
5 changed files with 64 additions and 19 deletions

View File

@@ -59,6 +59,12 @@ class module_console_systemUpgrade extends Command
{
$output->write('<info>Upgrading...</info>', true);
$appbox = appbox::get_instance();
if(count(User_Adapter::get_wrong_email_users($appbox)) > 0)
{
return $output->writeln(sprintf('<error>You have to fix your database before upgrade with the system:mailCheck command </error>'));
}
$upgrader = new Setup_Upgrade($appbox);
$advices = $appbox->forceUpgrade($upgrader);
}