mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Merge branch 'master' of github.com:alchemy-fr/Phraseanet
This commit is contained in:
@@ -36,9 +36,44 @@ class module_console_systemUpgrade extends Command
|
||||
|
||||
public function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if(!setup::is_installed())
|
||||
if (!setup::is_installed())
|
||||
{
|
||||
throw new RuntimeException('Phraseanet is not set up');
|
||||
|
||||
if (file_exists(dirname(__FILE__) . "/../../../../config/connexion.inc")
|
||||
&& !file_exists(dirname(__FILE__) . "/../../../../config/config.inc")
|
||||
&& file_exists(dirname(__FILE__) . "/../../../../config/_GV.php"))
|
||||
{
|
||||
|
||||
$output->writeln('This version of Phraseanet requires a config/config.inc');
|
||||
$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')));
|
||||
|
||||
if ($continue == 'y')
|
||||
{
|
||||
require __DIR__ . "/../../../../config/_GV.php";
|
||||
|
||||
$datas = '<?php'."\n"
|
||||
.'$servername = "'.GV_ServerName.'";'."\n"
|
||||
.'$maintenance=false;'."\n"
|
||||
.'$debug=false;'."\n"
|
||||
.'$debug=true;'."\n"
|
||||
.'';
|
||||
|
||||
file_put_contents(__DIR__ . "/../../../../config/config.inc", $datas);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException('Phraseanet is not set up');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../../lib/bootstrap.php';
|
||||
@@ -59,12 +94,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)
|
||||
|
||||
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);
|
||||
}
|
||||
|
@@ -1541,6 +1541,7 @@ class task_period_archive extends task_abstract
|
||||
$record->set_metadatas($meta['metadatas']);
|
||||
$record->set_binary_status(databox_status::operation_or($stat0, $stat1));
|
||||
$record->rebuild_subdefs();
|
||||
$record->reindex();
|
||||
$rid = $record->get_record_id();
|
||||
$this->log(sprintf((' (recordId %s)'), $rid));
|
||||
$this->archivedFiles++;
|
||||
@@ -1881,6 +1882,7 @@ class task_period_archive extends task_abstract
|
||||
$record->set_metadatas($meta['metadatas']);
|
||||
$record->set_binary_status(databox_status::operation_or(databox_status::operation_or($stat0, $stat1), databox_status::hex2bin($hexstat)));
|
||||
$record->rebuild_subdefs();
|
||||
$record->reindex();
|
||||
|
||||
$rid = $record->get_record_id();
|
||||
if ($grp_rid !== NULL)
|
||||
|
2
lib/vendor/symfony
vendored
2
lib/vendor/symfony
vendored
Submodule lib/vendor/symfony updated: 6924e63587...4316595dbb
Binary file not shown.
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Reference in New Issue
Block a user