mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Upgrade console commands
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -82,6 +82,30 @@ class module_console_systemUpgrade extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Core->getConfiguration()->setConnexions($connexions);
|
$Core->getConfiguration()->setConnexions($connexions);
|
||||||
|
|
||||||
|
|
||||||
|
$configs = $Core->getConfiguration()->getConfigurations();
|
||||||
|
|
||||||
|
$retrieve_old_parameters = function()
|
||||||
|
{
|
||||||
|
require __DIR__ . '/../../../../config/config.inc';
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'servername' => $servername
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
$old_parameters = $retrieve_old_parameters();
|
||||||
|
|
||||||
|
foreach ($configs as $env => $conf)
|
||||||
|
{
|
||||||
|
if (isset($configs[$env]['phraseanet']))
|
||||||
|
{
|
||||||
|
$configs[$env]['phraseanet']['servername'] = $old_parameters['servername'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$Core->getConfiguration()->setConfigurations($configs);
|
||||||
|
|
||||||
$Core->getConfiguration()->setEnvironnement('prod');
|
$Core->getConfiguration()->setEnvironnement('prod');
|
||||||
}
|
}
|
||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
|
Reference in New Issue
Block a user