mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
Update directory structure & allow to configure paths (tmp, log, cache)
This commit is contained in:
@@ -42,7 +42,7 @@ class module_console_sphinxGenerateSuggestion extends Command
|
||||
)
|
||||
));
|
||||
|
||||
$tmp_file = $this->container['root.path'] . '/tmp/dict' . $index . '.txt';
|
||||
$tmp_file = sys_get_temp_dir().'/dict' . $index . '.txt';
|
||||
|
||||
$databox = $this->getService('phraseanet.appbox')->get_databox($sbas_id);
|
||||
|
||||
|
@@ -31,21 +31,16 @@ class module_console_systemClearCache extends Command
|
||||
{
|
||||
$finder = new Finder();
|
||||
|
||||
$in = [];
|
||||
foreach ($this->container['cache.paths'] as $path) {
|
||||
$in[] = $path;
|
||||
};
|
||||
$finder
|
||||
->exclude('.git')
|
||||
->exclude('.svn')
|
||||
->in([
|
||||
$this->container['root.path'] . '/tmp/cache_minify/',
|
||||
$this->container['root.path'] . '/tmp/cache_twig/',
|
||||
$this->container['root.path'] . '/tmp/translations/',
|
||||
$this->container['root.path'] . '/tmp/cache/profiler/',
|
||||
$this->container['root.path'] . '/tmp/doctrine/',
|
||||
$this->container['root.path'] . '/tmp/serializer/',
|
||||
]);
|
||||
->in($in);
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
$filesystem->remove($finder);
|
||||
$this->container['filesystem']->remove($finder);
|
||||
|
||||
if ($this->container['phraseanet.configuration-tester']->isInstalled()) {
|
||||
$this->getService('phraseanet.cache-service')->flushAll();
|
||||
|
Reference in New Issue
Block a user