mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
85 lines
3.6 KiB
PHP
Executable File
85 lines
3.6 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2010 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
/**
|
|
*
|
|
* @package
|
|
* @package KonsoleKomander
|
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
|
* @link www.phraseanet.com
|
|
*/
|
|
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Application;
|
|
|
|
require_once dirname(__FILE__) . '/../lib/bootstrap.php';
|
|
|
|
try {
|
|
$app = new Application("
|
|
_____ _ _ _____ _____ ______ _ _ ______ _______
|
|
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
|
|
| |__) | |__| | |__) | / \ | (___ | |__ / \ | \| | |__ | |
|
|
| ___/| __ | _ / / /\ \ \___ \| __| / /\ \ | . ` | __| | |
|
|
| | | | | | | \ \ / ____ \ ____) | |____ / ____ \| |\ | |____ | |
|
|
|_| |_| |_|_| \_|_/ \_\_____/|______/_/ \_\_| \_|______| |_|
|
|
_ __ _ _ __ _
|
|
| |/ /___ _ _ ___ ___| |___ | |/ /___ _ __ _ __ __ _ _ _ __| |___ _ _
|
|
| ' </ _ \ ' \(_-</ _ \ / -_) | ' </ _ \ ' \| ' \/ _` | ' \/ _` / -_) '_|
|
|
|_|\_\___/_||_/__/\___/_\___| |_|\_\___/_|_|_|_|_|_\__,_|_||_\__,_\___|_|
|
|
|
|
Phraseanet Copyright (C) 2004 Alchemy
|
|
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());
|
|
|
|
$app->add(new module_console_aboutAuthors('about:authors'));
|
|
$app->add(new module_console_aboutLicense('about:license'));
|
|
|
|
$app->add(new module_console_checkExtension('check:extension'));
|
|
|
|
$app->add(new module_console_systemUpgrade('system:upgrade'));
|
|
|
|
$app->add(new module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions'));
|
|
|
|
$app->add(new module_console_systemMailCheck('system:mail:check'));
|
|
$app->add(new module_console_systemBackupDB('system:backup:db'));
|
|
$app->add(new module_console_systemClearCache('system:clear:cache'));
|
|
$app->add(new module_console_systemTemplateGenerator('system:template:generator'));
|
|
$app->add(new module_console_systemExport('system:export'));
|
|
|
|
$app->add(new module_console_taskrun('task:run'));
|
|
$app->add(new module_console_tasklist('task:list'));
|
|
$app->add(new module_console_taskState('task:state'));
|
|
$app->add(new module_console_schedulerState('scheduler:state'));
|
|
$app->add(new module_console_schedulerStop('scheduler:stop'));
|
|
$app->add(new module_console_schedulerStart('scheduler:start'));
|
|
$app->add(new module_console_fileEnsureProductionSetting('check:ensure:production:settings'));
|
|
$app->add(new module_console_fileEnsureDevSetting('check:ensure:dev:settings'));
|
|
$app->add(new module_console_systemConfigCheck('check:system'));
|
|
|
|
|
|
$app->add(new module_console_fieldsList('fields:list'));
|
|
$app->add(new module_console_fieldsDelete('fields:delete'));
|
|
$app->add(new module_console_fieldsRename('fields:rename'));
|
|
$app->add(new module_console_fieldsMerge('fields:merge'));
|
|
|
|
$result_code = is_int($app->run()) ? : 1;
|
|
} catch (Exception $e) {
|
|
echo sprintf("an error occured : %s", $e->getMessage());
|
|
}
|
|
|
|
exit($result_code);
|