Remove phraseanet services, update configuration

This commit is contained in:
Romain Neutron
2013-06-11 11:57:43 +02:00
parent 8ecc97e94e
commit 32c2d6154a
99 changed files with 1545 additions and 5049 deletions

View File

@@ -10,7 +10,6 @@
*/
use Alchemy\Phrasea\Application;
use Symfony\Component\Yaml\Yaml;
class patch_3806 implements patchInterface
{
@@ -49,29 +48,7 @@ class patch_3806 implements patchInterface
*/
public function apply(base $appbox, Application $app)
{
$parser = new Yaml();
$data = $parser->parse(file_get_contents(__DIR__ . '/../../conf.d/config.yml'));
$fields = $data['prod']['registration-fields'];
$authentication = $data['prod']['authentication'];
$confs = $app['phraseanet.configuration']->getConfigurations();
foreach ($confs as $env => $conf) {
if (in_array($env, array('environment', 'key'))) {
continue;
}
if (!isset($conf['registration-fields'])) {
$confs[$env]['registration-fields'] = $fields;
}
if (!isset($conf['authentication'])) {
$confs[$env]['authentication'] = $authentication;
}
}
$app['phraseanet.configuration']->setConfigurations($confs);
$app['phraseanet.configuration']->setDefault('registration-fields');
$app['phraseanet.configuration']->setDefault('authentication');
}
}