浏览代码

Fix is_writable check for templates/cache

tags/vichan-4.9.92
kpcyrd czaks 9 年前
父节点
当前提交
9a98d518a0
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      inc/template.php
  2. +1
    -1
      install.php

+ 1
- 1
inc/template.php 查看文件

@@ -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']
));


+ 1
- 1
install.php 查看文件

@@ -721,7 +721,7 @@ if ($step == 0) {
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.'
),


正在加载...
取消
保存