mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-08 10:34:34 +00:00
Remove deprectaed feature
This commit is contained in:
@@ -38,8 +38,4 @@ class module_console_aboutAuthors extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -37,9 +37,4 @@ class module_console_aboutLicense extends Command
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -36,11 +36,6 @@ class module_console_checkExtension extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if ( ! extension_loaded('phrasea2')) {
|
||||
|
@@ -35,11 +35,6 @@ class module_console_fieldsDelete extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
|
@@ -31,11 +31,6 @@ class module_console_fieldsList extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
foreach ($this->getService('phraseanet.appbox')->get_databoxes() as $databox) {
|
||||
|
@@ -45,11 +45,6 @@ class module_console_fieldsMerge extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->writeln("");
|
||||
|
@@ -36,11 +36,6 @@ class module_console_fieldsRename extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$new_name = $input->getArgument('name');
|
||||
|
@@ -57,11 +57,6 @@ class module_console_fileEnsureDevSetting extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->configuration = $this->container['phraseanet.configuration'];
|
||||
|
@@ -57,11 +57,6 @@ class module_console_fileEnsureProductionSetting extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->configuration = $this->container['phraseanet.configuration'];
|
||||
|
@@ -34,11 +34,6 @@ class module_console_schedulerStart extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$logger = new Logger('Task logger');
|
||||
|
@@ -49,16 +49,9 @@ class module_console_schedulerState extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$this->checkSetup();
|
||||
} catch (\RuntimeException $e) {
|
||||
if (!$this->container['phraseanet.configuration']->isInstalled()) {
|
||||
return self::EXITCODE_SETUP_ERROR;
|
||||
}
|
||||
|
||||
|
@@ -31,11 +31,6 @@ class module_console_schedulerStop extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
|
@@ -31,11 +31,6 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
define('FREQ_THRESHOLD', 10);
|
||||
|
@@ -38,11 +38,6 @@ class module_console_systemBackupDB extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->write('Phraseanet is going to be backup...', true);
|
||||
|
@@ -32,11 +32,6 @@ class module_console_systemClearCache extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$finder = new Finder();
|
||||
|
@@ -32,11 +32,6 @@ class module_console_systemConfigCheck extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if ( ! function_exists('_')) {
|
||||
|
@@ -71,11 +71,6 @@ class module_console_systemExport extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$docPerDir = max(1, (int) $input->getOption('docperdir'));
|
||||
|
@@ -37,11 +37,6 @@ class module_console_systemMailCheck extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->writeln("Processing...");
|
||||
|
@@ -33,11 +33,6 @@ class module_console_systemTemplateGenerator extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$tplDirs = array(
|
||||
|
@@ -36,51 +36,22 @@ class module_console_systemUpgrade extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
|
||||
|
||||
$interactive = !$input->getOption('yes');
|
||||
|
||||
if (!$this->container['phraseanet.configuration']->isInstalled() && \setup::needUpgradeConfigurationFile()) {
|
||||
|
||||
if ($interactive) {
|
||||
$output->writeln('This version of Phraseanet requires a config/config.yml, config/connexion.yml, config/service.yml');
|
||||
$output->writeln('Would you like it to be created based on your settings ?');
|
||||
|
||||
$dialog = $this->getHelperSet()->get('dialog');
|
||||
do {
|
||||
$continue = mb_strtolower($dialog->ask($output, '<question>' . _('Create automatically') . ' (Y/n)</question>', 'y'));
|
||||
} while (!in_array($continue, array('y', 'n')));
|
||||
} else {
|
||||
$continue = 'y';
|
||||
}
|
||||
|
||||
if ($continue == 'y') {
|
||||
try {
|
||||
if (\setup::requireGVUpgrade()) {
|
||||
setup::upgradeGV($this->container['phraseanet.registry']);
|
||||
}
|
||||
|
||||
$connexionInc = new \SplFileInfo(__DIR__ . '/../../../../config/connexion.inc');
|
||||
$configInc = new \SplFileInfo(__DIR__ . '/../../../../config/config.inc');
|
||||
|
||||
$this->getService('phraseanet.configuration')->upgradeFromOldConf($configInc, $connexionInc);
|
||||
} catch (\Exception $e) {
|
||||
throw new RuntimeException('Error while upgrading : ' . $e->getMessage());
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException('Phraseanet is not set up');
|
||||
while ($migrations = $this->container['phraseanet.configuration-tester']->getMigrations()) {
|
||||
foreach ($migrations as $migration) {
|
||||
echo get_class($migration) . "\n";
|
||||
$migration->migrate();
|
||||
echo get_class($migration) . " finished\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $this->getService('phraseanet.configuration')->isInstalled()) {
|
||||
throw new \RuntimeException('Phraseanet must be set-up (no connexion.inc / no config.inc)');
|
||||
if (!$this->getService('phraseanet.configuration')->isInstalled()) {
|
||||
throw new \RuntimeException('Phraseanet must be set-up');
|
||||
}
|
||||
|
||||
$output->write('Phraseanet is going to be upgraded', true);
|
||||
|
@@ -57,16 +57,9 @@ class module_console_taskState extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$this->checkSetup();
|
||||
} catch (\RuntimeException $e) {
|
||||
if (!$this->container['phraseanet.configuration']->isInstalled()) {
|
||||
return self::EXITCODE_SETUP_ERROR;
|
||||
}
|
||||
|
||||
|
@@ -32,16 +32,9 @@ class module_console_tasklist extends Command
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$this->checkSetup();
|
||||
} catch (\RuntimeException $e) {
|
||||
if (!$this->container['phraseanet.configuration']->isInstalled()) {
|
||||
return self::EXITCODE_SETUP_ERROR;
|
||||
}
|
||||
|
||||
|
@@ -63,16 +63,9 @@ class module_console_taskrun extends Command
|
||||
}
|
||||
}
|
||||
|
||||
public function requireSetup()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$this->checkSetup();
|
||||
} catch (\RuntimeException $e) {
|
||||
if (!$this->container['phraseanet.configuration']->isInstalled()) {
|
||||
return self::EXITCODE_SETUP_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user