forked from GithubBackups/vichan
New option: $config[twig_cache]
This commit is contained in:
parent
bebd364a59
commit
a97b08db42
@ -1715,3 +1715,6 @@
|
|||||||
|
|
||||||
// Use oekaki?
|
// Use oekaki?
|
||||||
$config['oekaki'] = false;
|
$config['oekaki'] = false;
|
||||||
|
|
||||||
|
// Twig cache?
|
||||||
|
$config['twig_cache'] = false;
|
||||||
|
@ -213,8 +213,10 @@ $config['show_sages'] = false;
|
|||||||
$config['katex'] = false;
|
$config['katex'] = false;
|
||||||
$config['enable_antibot'] = false;
|
$config['enable_antibot'] = false;
|
||||||
$config['spam']['unicode'] = false;
|
$config['spam']['unicode'] = false;
|
||||||
|
$config['twig_cache'] = true;
|
||||||
// 8chan specific mod pages
|
// 8chan specific mod pages
|
||||||
require '8chan-mod-pages.php';
|
require '8chan-mod-pages.php';
|
||||||
|
|
||||||
// Load database credentials
|
// Load database credentials
|
||||||
require "secrets.php";
|
require "secrets.php";
|
||||||
|
|
||||||
|
@ -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['twig_cache'] ?
|
||||||
"{$config['dir']['template']}/cache" : false,
|
"{$config['dir']['template']}/cache" : false,
|
||||||
'debug' => $config['debug']
|
'debug' => $config['debug']
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user