mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge 4.0 into master
This commit is contained in:
@@ -20,12 +20,14 @@ class Configuration extends Command
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('compile:configuration');
|
||||
|
||||
$this->setDescription('Compiles YAML configuration to plain PHP');
|
||||
}
|
||||
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->container['configuration.store']->compileAndWrite();
|
||||
|
||||
$output->writeln("Configuration compiled.");
|
||||
|
||||
return 0;
|
||||
|
@@ -144,7 +144,7 @@ class Configuration implements ConfigurationInterface
|
||||
public function setConfig(array $config)
|
||||
{
|
||||
$this->cache = $config;
|
||||
$this->dumpFile($this->config, $this->parser->dump($config, 7));
|
||||
$this->dumpFile($this->config, $this->parser->dump($config, 7), 0660);
|
||||
$this->writeCacheConfig($this->compiler->compile($config));
|
||||
|
||||
return $this;
|
||||
@@ -183,7 +183,7 @@ class Configuration implements ConfigurationInterface
|
||||
public function initialize()
|
||||
{
|
||||
$this->delete();
|
||||
$this->dumpFile($this->config, $this->loadFile(__DIR__ . static::CONFIG_REF), 0600);
|
||||
$this->dumpFile($this->config, $this->loadFile(__DIR__ . static::CONFIG_REF), 0660);
|
||||
|
||||
// force rewrite
|
||||
$this->getConfig();
|
||||
@@ -211,7 +211,8 @@ class Configuration implements ConfigurationInterface
|
||||
|
||||
private function writeCacheConfig($content)
|
||||
{
|
||||
$this->dumpFile($this->compiled, $content, 0600);
|
||||
$this->dumpFile($this->compiled, $content, 0660);
|
||||
|
||||
if(function_exists("opcache_invalidate")) {
|
||||
opcache_invalidate($this->compiled);
|
||||
}
|
||||
@@ -234,6 +235,7 @@ class Configuration implements ConfigurationInterface
|
||||
private function dumpFile($file, $content, $mod = 0600)
|
||||
{
|
||||
$tmpFile = tempnam(dirname($file), basename($file));
|
||||
|
||||
if (false !== @file_put_contents($tmpFile, $content)) {
|
||||
// rename does not work on Win32 before 5.2.6
|
||||
if (@rename($tmpFile, $file)) {
|
||||
|
@@ -29,8 +29,8 @@
|
||||
|
||||
<ul class="unstyled">
|
||||
<li>{{ 'phraseanet:: adresse' | trans }} : {{ collection.get_databox().get_serialized_server_info() }}</li>
|
||||
<li>{{ 'admin::base:collection: identifiant' | trans }} : {{ collection.get_base_id() }}</li>
|
||||
<li>{{ 'admin::base:collection: numero de collection distante' | trans }} : {{ collection.get_coll_id() }}</li>
|
||||
<li>{{ 'admin::base:collection: numero de collection locale' | trans }} : {{ collection.get_base_id() }}</li>
|
||||
<li>{{ 'admin::base:collection: etat de la collection' | trans }} : {{ collection.is_active() ? "admin::base:collection: activer la collection"| trans : "admin::base:collection: descativer la collection"|trans }}</li>
|
||||
<li>{{ collection.get_record_amount() }} records <a class="ajax" target="rights" href="{{ path('admin_collection_display_document_details', { 'bas_id' : collection.get_base_id() }) }}">{{ 'phraseanet:: details' | trans }}</a></li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user