From 5cc7bd860fe653db831b20c7937a80ef35221f56 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Thu, 22 Aug 2013 03:35:57 +1000 Subject: Add cache and gm to pre-installation test. Don't die when we can't write to templates/cache. --- inc/template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') 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()); -- cgit v1.3