From 3e734006d6f7d92c87d1b63b99a9b1dafe926a1f Mon Sep 17 00:00:00 2001 From: SecretR Date: Wed, 3 Apr 2013 12:25:30 +0300 Subject: [PATCH] e_CACHE override for old installations (containing $CACHE_DIRECTORY value in their configs) --- e107_handlers/e107_class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 0e4dcda42..eaa1a3745 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -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; }