Check if application exists

This commit is contained in:
Nicolas Le Goff
2014-09-10 20:40:32 +02:00
parent d2dd0d492f
commit 5994dba2dc
2 changed files with 12 additions and 9 deletions

View File

@@ -111,11 +111,12 @@ class Install extends Command
$this->container['phraseanet.installer']->setPhraseaIndexerPath($indexer); $this->container['phraseanet.installer']->setPhraseaIndexerPath($indexer);
$this->container['phraseanet.installer']->install($email, $password, $abConn, $serverName, $dataPath, $dbConn, $template, $this->detectBinaries()); $this->container['phraseanet.installer']->install($email, $password, $abConn, $serverName, $dataPath, $dbConn, $template, $this->detectBinaries());
if (null !== $this->getApplication()) {
$command = $this->getApplication()->find('crossdomain:generate'); $command = $this->getApplication()->find('crossdomain:generate');
$command->run(new ArrayInput(array( $command->run(new ArrayInput(array(
'command' => 'crossdomain:generate' 'command' => 'crossdomain:generate'
)), $output); )), $output);
}
$output->writeln("<info>Install successful !</info>"); $output->writeln("<info>Install successful !</info>");

View File

@@ -106,10 +106,12 @@ class module_console_systemUpgrade extends Command
$output->writeln(""); $output->writeln("");
} }
if (null !== $this->getApplication()) {
$command = $this->getApplication()->find('crossdomain:generate'); $command = $this->getApplication()->find('crossdomain:generate');
$command->run(new ArrayInput(array( $command->run(new ArrayInput(array(
'command' => 'crossdomain:generate' 'command' => 'crossdomain:generate'
)), $output); )), $output);
}
} else { } else {
$output->write('<info>Canceled</info>', true); $output->write('<info>Canceled</info>', true);
} }