The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit a190a3a0 authored by Demian Katz's avatar Demian Katz
Browse files

Merge pull request #488 from finc/cache_mkdir_fix

fixes the warning if a cache folder does not exist
parents faeb3f9a bee762e3
No related merge requests found
......@@ -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
// to account for potentially variant environment settings):
$baseDir = ($local = getenv('VUFIND_LOCAL_DIR')) ? $local : 'data';
$cacheDir = $baseDir . '/cache';
if (!is_dir($cacheDir)) {
mkdir($cacheDir);
}
if (PHP_SAPI == 'cli') {
$cacheDir = $baseDir . '/cache/cli';
$cacheDir .= '/cli';
if (!is_dir($cacheDir)) {
mkdir($cacheDir);
}
$cacheDir .= '/configs';
} else {
$cacheDir = $baseDir . '/cache/configs';
$cacheDir .= '/configs';
}
if (!is_dir($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