From bc8a847e484ba55edf9fff229a2b06e27ee1f6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 16 Mar 2017 16:04:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0cdn=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index dacbbc81..1a5f0529 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -88,10 +88,10 @@ class Information extends CI_Controller { } $this->InfoStructures_model->Delete($Structure->is_id); $this->InfoContents_model->Delete($Structure->is_ic_id); - //如果是已经发布的页面,删除静态文件 - if ($info_detail->ic_status == 1) { - $this->update_cache($info_detail->ic_url, true); - } + //如果是已经发布的页面,删除静态文件 + if ($info_detail->ic_status == 1) { + $this->update_cache($info_detail->ic_url, true); + } //删除成功后返回一个上级链接给用户 $drumpurl = site_url('information/edit/' . $Structure->is_parent_id); if ($Structure->is_parent_id == 0) @@ -492,13 +492,13 @@ class Information extends CI_Controller { $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $tmp; } } - } else if($this->config->item('site_code') == 'ah'){ - if($delete_only===true){ - $url = 'https://www.asiahighlights.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; - }else{ - $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url; - } - }else{ //子站点使用 + } else if ($this->config->item('site_code') == 'ah') { + if ($delete_only === true) { + $url = 'https://www.asiahighlights.com/index.php/information/delete_cache_8X913mksJ/?static_html_url=' . $url; + } else { + $url = 'https://www.asiahighlights.com/index.php/information/detail/?static_html_url=' . $url; + } + } else { //子站点使用 $url = $this->config->item('site_url') . $url . '@cache@refresh'; } @@ -569,7 +569,7 @@ class Information extends CI_Controller { //默认更新成功,如果不成功,则返回错误提示信息 $notice = 200; if ($flag) { - $result = file_get_contents('https://openapi.us.cdnetworks.com/purge/rest/doPurge?user=ycc@chinahighlights.com&pass=cXi2UbsTrw9Urv&pad=' . $pad . '&type=item&path=' . $url . '&output=json'); + $result = GET_HTTP('https://openapi.us.cdnetworks.com/purge/rest/doPurge?user=ycc@chinahighlights.com&pass=cXi2UbsTrw9Urv@&pad=' . $pad . '&type=item&path=' . $url . '&output=json'); $result = json_decode($result, true); if ($result['resultCode'] != 200) $notice = $result['notice'] . $result['details'];