Skip to content

Commit

Permalink
Fix is_writable check for templates/cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kpcyrd authored and czaks committed Aug 8, 2014
1 parent fa198e2 commit 9a98d51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/template.php
Expand Up @@ -23,7 +23,7 @@ function load_twig() {
$loader->setPaths($config['dir']['template']);
$twig = new Twig_Environment($loader, array(
'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,
'debug' => $config['debug']
));
Expand Down
2 changes: 1 addition & 1 deletion install.php
Expand Up @@ -721,7 +721,7 @@ function __query($sql) {
array(
'category' => 'File permissions',
'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,
'message' => 'You must give vichan permission to create (and write to) the <code>templates/cache</code> directory or performance will be drastically reduced.'
),
Expand Down

0 comments on commit 9a98d51

Please sign in to comment.