mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Add alpha5 patch
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Alchemy\Phrasea\Core;
|
|||||||
*/
|
*/
|
||||||
class Version
|
class Version
|
||||||
{
|
{
|
||||||
protected static $number = '3.8.0.a3';
|
protected static $number = '3.8.0.a5';
|
||||||
protected static $name = 'Carnosaurus';
|
protected static $name = 'Carnosaurus';
|
||||||
|
|
||||||
public static function getNumber()
|
public static function getNumber()
|
||||||
|
78
lib/classes/patch/3806.php
Normal file
78
lib/classes/patch/3806.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2012 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Application;
|
||||||
|
use Entities\AuthFailure;
|
||||||
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
|
class patch_3806 implements patchInterface
|
||||||
|
{
|
||||||
|
/** @var string */
|
||||||
|
private $release = '3.8.0.a5';
|
||||||
|
|
||||||
|
/** @var array */
|
||||||
|
private $concern = array(base::APPLICATION_BOX);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_release()
|
||||||
|
{
|
||||||
|
return $this->release;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function require_all_upgrades()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function concern()
|
||||||
|
{
|
||||||
|
return $this->concern;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user