diff options
| author | czaks <marcin@6irc.net> | 2013-08-28 12:41:36 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-28 12:41:36 -0400 |
| commit | 8503e65858ce3145a11f8daec4104e3a7249c889 (patch) | |
| tree | c619ac3da567cacb96ed9b95a75bb3c1cbbcc87a /inc/template.php | |
| parent | 753b67aa71963f32ec3c3bc7c18f53bb00f2e4f8 (diff) | |
| parent | 7a4e481333c3ab39ea63c2d961a7c05016b12460 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts:
inc/config.php
inc/functions.php
install.php
stylesheets/dark_roach.css
Diffstat (limited to 'inc/template.php')
| -rw-r--r-- | inc/template.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php index 09e27c26..ef688944 100644 --- a/inc/template.php +++ b/inc/template.php @@ -26,7 +26,8 @@ function load_twig() { $loader->setPaths($config['dir']['template']); $twig = new Twig_Environment($loader, array( 'autoescape' => false, - 'cache' => "{$config['dir']['template']}/cache", + 'cache' => is_writable('templates') && (!is_dir('templates/cache') || is_writable('templates/cache')) ? + "{$config['dir']['template']}/cache" : false, 'debug' => $config['debug'] )); $twig->addExtension(new Twig_Extensions_Extension_Tinyboard()); |
