Skip to content
Snippets Groups Projects
Commit bee762e3 authored by André Lahmann's avatar André Lahmann
Browse files

* fixes the warning if a cache folder does not

parent 47635f47
No related merge requests found
...@@ -22,14 +22,18 @@ if ($localModules = getenv('VUFIND_LOCAL_MODULES')) { ...@@ -22,14 +22,18 @@ if ($localModules = getenv('VUFIND_LOCAL_MODULES')) {
// Set up cache directory (be sure to keep separate cache for CLI vs. web and // Set up cache directory (be sure to keep separate cache for CLI vs. web and
// to account for potentially variant environment settings): // to account for potentially variant environment settings):
$baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data'; $baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data';
$cacheDir = $baseDir . '/cache';
if (!is_dir($cacheDir)) {
mkdir($cacheDir);
}
if (PHP_SAPI == 'cli') { if (PHP_SAPI == 'cli') {
$cacheDir = $baseDir . '/cache/cli'; $cacheDir .= '/cli';
if (!is_dir($cacheDir)) { if (!is_dir($cacheDir)) {
mkdir($cacheDir); mkdir($cacheDir);
} }
$cacheDir .= '/configs'; $cacheDir .= '/configs';
} else { } else {
$cacheDir = $baseDir . '/cache/configs'; $cacheDir .= '/configs';
} }
if (!is_dir($cacheDir)) { if (!is_dir($cacheDir)) {
mkdir($cacheDir); mkdir($cacheDir);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment