diff --git a/Upload.class.php b/Upload.class.php index fe0c227..efb7598 100644 --- a/Upload.class.php +++ b/Upload.class.php @@ -11,7 +11,9 @@ abstract class Upload public static function &getGreagwarImage($file_path) { $greagwar_image = new GreagwarImage($file_path); - $greagwar_image->setCacheDir(Config::get('PATH_WEB_ROOT') . DIRECTORY_SEPARATOR . self::$dir_image_cache); + $config_upload = Config::get('Upload'); + $dir_image_cache = $config_upload ? $config_upload->dir_image_cache : self::$dir_image_cache; + $greagwar_image->setCacheDir(Config::get('PATH_WEB_ROOT') . DIRECTORY_SEPARATOR . $dir_image_cache); return $greagwar_image; }