diff --git a/application/controllers/information.php b/application/controllers/information.php index be98c645..52f1e0ca 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -392,9 +392,9 @@ class Information extends CI_Controller { $auto_update_cache = $this->input->get_post('auto_update_cache_checkbox'); if ($site_code == 'gm' && substr($ic_url, 0, 5) == '/faq/') { $this->update_cache($ic_url, true); - } else if ($site_code == 'cht' && !empty($auto_update_cache)) { + } else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) { $this->update_cache($ic_url); - } else { + } else if (strcasecmp($site_code, "cht") != 0) { $this->update_cache($ic_url); } @@ -474,6 +474,7 @@ class Information extends CI_Controller { //更新静态文件 //不用参数提交的原因是可能url带有特殊字符,CI会报错 public function update_cache($static_html_url = false, $delete_only = false) { + $url = $static_html_url; if (empty($url)) { $url = $this->input->post('cache_url');