Fix is_writable check for templates/cache
This commit is contained in:
parent
fa198e207f
commit
9a98d518a0
@ -23,7 +23,7 @@ function load_twig() {
|
|||||||
$loader->setPaths($config['dir']['template']);
|
$loader->setPaths($config['dir']['template']);
|
||||||
$twig = new Twig_Environment($loader, array(
|
$twig = new Twig_Environment($loader, array(
|
||||||
'autoescape' => false,
|
'autoescape' => false,
|
||||||
'cache' => is_writable('templates') && (!is_dir('templates/cache') || is_writable('templates/cache')) ?
|
'cache' => is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache')) ?
|
||||||
"{$config['dir']['template']}/cache" : false,
|
"{$config['dir']['template']}/cache" : false,
|
||||||
'debug' => $config['debug']
|
'debug' => $config['debug']
|
||||||
));
|
));
|
||||||
|
@ -721,7 +721,7 @@ if ($step == 0) {
|
|||||||
array(
|
array(
|
||||||
'category' => 'File permissions',
|
'category' => 'File permissions',
|
||||||
'name' => getcwd() . '/templates/cache',
|
'name' => getcwd() . '/templates/cache',
|
||||||
'result' => is_writable('templates') && (!is_dir('templates/cache') || is_writable('templates/cache')),
|
'result' => is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache')),
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'message' => 'You must give vichan permission to create (and write to) the <code>templates/cache</code> directory or performance will be drastically reduced.'
|
'message' => 'You must give vichan permission to create (and write to) the <code>templates/cache</code> directory or performance will be drastically reduced.'
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user