Update directory structure & allow to configure paths (tmp, log, cache)

This commit is contained in:
Nicolas Le Goff
2014-09-05 11:28:25 +02:00
parent 69fd50906f
commit de7988689e
2201 changed files with 850 additions and 13650 deletions

View File

@@ -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);

View File

@@ -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();