diff --git a/bin/console b/bin/console index 478f22d1ef..2ed97fac0c 100755 --- a/bin/console +++ b/bin/console @@ -9,13 +9,18 @@ * file that was distributed with this source code. */ +namespace KonsoleKommander; + /** * - * @package - * @package KonsoleKomander * @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @link www.phraseanet.com */ +use Alchemy\Phrasea\Core\Configuration; +use Alchemy\Phrasea\Core\Version; +use Alchemy\Phrasea\Command\UpgradeDBDatas; +use Alchemy\Phrasea\Command\RescanTechnicalDatas; +use Alchemy\Phrasea\Command\BuildMissingSubdefs; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -25,9 +30,9 @@ use Symfony\Component\Console\Application; require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php'; -bootstrap::register_autoloads(); +\bootstrap::register_autoloads(); -$configuration = Alchemy\Phrasea\Core\Configuration::build(); +$configuration = Configuration::build(); if ($configuration->isInstalled()) { require_once dirname(__FILE__) . '/../lib/bootstrap.php'; } @@ -49,8 +54,7 @@ try { This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; type `about:license' for details.\n\n" - . ' KONSOLE KOMMANDER', \Alchemy\Phrasea\Core\Version::getName() - . ' ' . \Alchemy\Phrasea\Core\Version::getNumber()); + . ' KONSOLE KOMMANDER', Version::getName() . ' ' . Version::getNumber()); $app->add(new module_console_aboutAuthors('about:authors')); $app->add(new module_console_aboutLicense('about:license')); @@ -58,7 +62,7 @@ try { $app->add(new module_console_checkExtension('check:extension')); $app->add(new module_console_systemUpgrade('system:upgrade')); - $app->add(new \Alchemy\Phrasea\Command\UpgradeDBDatas('system:upgrade-datas')); + $app->add(new UpgradeDBDatas('system:upgrade-datas')); $app->add(new module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions')); @@ -84,8 +88,8 @@ try { $app->add(new module_console_fieldsRename('fields:rename')); $app->add(new module_console_fieldsMerge('fields:merge')); - $app->add(new Alchemy\Phrasea\Command\RescanTechnicalDatas('records:rescan-technical-datas')); - $app->add(new Alchemy\Phrasea\Command\BuildMissingSubdefs('records:build-missing-subdefs')); + $app->add(new RescanTechnicalDatas('records:rescan-technical-datas')); + $app->add(new BuildMissingSubdefs('records:build-missing-subdefs')); $result_code = is_int($app->run()) ? : 1; } catch (Exception $e) { diff --git a/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php b/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php index fe646cd9f0..92f4470465 100644 --- a/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php +++ b/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php @@ -303,4 +303,4 @@ class Step35 implements DatasUpgraderInterface } } -} \ No newline at end of file +} diff --git a/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php b/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php index acb064e0e6..831defe1f7 100644 --- a/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php +++ b/lib/Alchemy/Phrasea/Controller/Setup/Upgrader.php @@ -75,6 +75,10 @@ class Upgrader implements ControllerProviderInterface $upgrader = new \Setup_Upgrade($appbox); $appbox->forceUpgrade($upgrader); + /** + * @todo Show recomandation instead of redirect + */ + return new \Symfony\Component\HttpFoundation\RedirectResponse('/'); }); diff --git a/lib/classes/Setup/Upgrade.class.php b/lib/classes/Setup/Upgrade.class.php index 23ed9220bf..5bdd116fa2 100644 --- a/lib/classes/Setup/Upgrade.class.php +++ b/lib/classes/Setup/Upgrade.class.php @@ -134,6 +134,11 @@ class Setup_Upgrade $this->recommendations[] = array($recommendation, $command); } + /** + * Return an array of recommendations + * + * @return array + */ public function getRecommendations() { return $this->recommendations; diff --git a/templates/web/common/drop_down_options.html b/templates/web/common/drop_down_options.html index 54e1bd649a..9c3a48b1f1 100644 --- a/templates/web/common/drop_down_options.html +++ b/templates/web/common/drop_down_options.html @@ -1,5 +1,5 @@ {% macro prod(record, user, entry_id)%} - {% if entry_id is none %} + {% if not entry_id %} ▼