mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix root path registry value in setup mode
This commit is contained in:
@@ -20,6 +20,11 @@ class Setup_Registry implements registryInterface
|
|||||||
{
|
{
|
||||||
protected $datas = array();
|
protected $datas = array();
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->datas['GV_RootPath'] = realpath(__DIR__ . '/../../..') . '/';
|
||||||
|
}
|
||||||
|
|
||||||
public function get($key, $defaultvalue = null)
|
public function get($key, $defaultvalue = null)
|
||||||
{
|
{
|
||||||
return isset($this->datas[$key]) ? $this->datas[$key] : $defaultvalue;
|
return isset($this->datas[$key]) ? $this->datas[$key] : $defaultvalue;
|
||||||
|
@@ -10,11 +10,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
use Alchemy\Phrasea\Core\Version;
|
|
||||||
use MediaAlchemyst\Alchemyst;
|
use MediaAlchemyst\Alchemyst;
|
||||||
use MediaAlchemyst\Specification\Image as ImageSpecification;
|
use MediaAlchemyst\Specification\Image as ImageSpecification;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
use Symfony\Component\HttpFoundation\File\File as SymfoFile;
|
use Symfony\Component\HttpFoundation\File\File as SymfoFile;
|
||||||
|
use Symfony\Component\Finder\Finder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -349,11 +349,14 @@ class appbox extends base
|
|||||||
*/
|
*/
|
||||||
$upgrader->set_current_message(_('Purging directories'));
|
$upgrader->set_current_message(_('Purging directories'));
|
||||||
|
|
||||||
$finder = new Symfony\Component\Finder\Finder();
|
$finder = new Finder();
|
||||||
$finder->in(array(
|
$finder->in(array(
|
||||||
$this->app['phraseanet.registry']->get('GV_RootPath') . 'tmp/cache_minify/',
|
$this->app['phraseanet.registry']->get('GV_RootPath') . 'tmp/cache_minify/',
|
||||||
$this->app['phraseanet.registry']->get('GV_RootPath') . 'tmp/cache_minify/',
|
$this->app['phraseanet.registry']->get('GV_RootPath') . 'tmp/cache_twig/',
|
||||||
))->ignoreVCS(true)->ignoreDotFiles(true);
|
))
|
||||||
|
->depth(0)
|
||||||
|
->ignoreVCS(true)
|
||||||
|
->ignoreDotFiles(true);
|
||||||
|
|
||||||
foreach ($finder as $file) {
|
foreach ($finder as $file) {
|
||||||
$app['filesystem']->remove($file);
|
$app['filesystem']->remove($file);
|
||||||
|
Reference in New Issue
Block a user