1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

e_CACHE override for old installations (containing $CACHE_DIRECTORY value in their configs)

This commit is contained in:
SecretR
2013-04-03 12:25:30 +03:00
parent afb2f5bd48
commit 3e734006d6

View File

@@ -386,6 +386,8 @@ class e107
// override all
$this->e107_dirs = array_merge($this->defaultDirs($override), $override);
// TODO add e_MEDIA_BASE, e_SYSTEM_BASE (free of site path constants);
if(strpos($this->e107_dirs['MEDIA_DIRECTORY'],$this->site_path) === false)
{
$this->e107_dirs['MEDIA_DIRECTORY'] .= $this->site_path."/"; // multisite support.
@@ -395,6 +397,12 @@ class e107
{
$this->e107_dirs['SYSTEM_DIRECTORY'] .= $this->site_path."/"; // multisite support.
}
// FIXME Quick fix - override base cache folder for legacy configs (e.g. e107_files/cache), discuss
if(strpos($this->e107_dirs['CACHE_DIRECTORY'], $this->site_path) === false)
{
$this->e107_dirs['CACHE_DIRECTORY'] = $this->e107_dirs['SYSTEM_DIRECTORY']."cache/"; // multisite support.
}
return $this;
}