|
|
|
@ -484,17 +484,7 @@ class Information extends CI_Controller {
|
|
|
|
|
$original_url = $url;
|
|
|
|
|
|
|
|
|
|
if ($this->config->item('site_code') == 'cht') {
|
|
|
|
|
//$url = 'http://www.chinahighlights.com/api/community/updatecache.asp?gurl=http://www.chinahighlights.com' . $url . '&other=1&site=info';
|
|
|
|
|
//$url = 'http://192.155.224.195:2222/guide-use.php/travelguide/guide/?static_html_url=' . $url;
|
|
|
|
|
$url = 'http://192.155.224.195:8080/guide-use.php/travelguide/guide/?static_html_url=' . $url;
|
|
|
|
|
|
|
|
|
|
//ch的部分控制器不是travelguide,所以不能统一更新和生产缓存文件,只能跳过,统一控制器再回头取消这个限制
|
|
|
|
|
if (strpos($url, '/festivals/') !== false) {
|
|
|
|
|
$url = 'http://www.chinahighlights.com/';
|
|
|
|
|
}
|
|
|
|
|
if (strpos($url, '/faq/') !== false) {
|
|
|
|
|
$url = 'http://www.chinahighlights.com/';
|
|
|
|
|
}
|
|
|
|
|
$url = 'http://184.172.113.219:22223' . $url;
|
|
|
|
|
} elseif ($this->config->item('site_code') == 'gm') {
|
|
|
|
|
$url = "http://148.251.35.42:3300/create-cache/?url=$url";
|
|
|
|
|
} else if (is_series_site()) {
|
|
|
|
@ -541,19 +531,6 @@ class Information extends CI_Controller {
|
|
|
|
|
if ($content === false) {
|
|
|
|
|
$data[] = array('name' => 'no', 'value' => sprintf($this->lang->line('update_cache_failed'), $url));
|
|
|
|
|
} else {
|
|
|
|
|
//todo:如果请求正常,则判断返回的json是否正常
|
|
|
|
|
//echo json_decode($content);
|
|
|
|
|
//CHT网站还需要更新前端服务器缓存
|
|
|
|
|
if ($this->config->item('site_code') == 'cht') {
|
|
|
|
|
$url = 'http://www.chinahighlights.com/api/community/updatecache.asp?gurl=http://www.chinahighlights.com' . $original_url . '&other=1&site=info';
|
|
|
|
|
$content = GET_HTTP($url);
|
|
|
|
|
if ($content === false) {
|
|
|
|
|
$data[] = array('name' => 'no', 'value' => sprintf($this->lang->line('update_vps_failed'), $url));
|
|
|
|
|
echo json_encode($data);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//手动更新的话,接着更新CDN缓存
|
|
|
|
|
$msg = $this->lang->line('update_cache_success');
|
|
|
|
|
|
|
|
|
|