|
|
@ -12,6 +12,7 @@ class infofix extends CI_Controller
|
|
|
|
$this->load->model('Information_model');
|
|
|
|
$this->load->model('Information_model');
|
|
|
|
$this->load->model('infoContents_model');
|
|
|
|
$this->load->model('infoContents_model');
|
|
|
|
$this->load->model('infoMetas_model');
|
|
|
|
$this->load->model('infoMetas_model');
|
|
|
|
|
|
|
|
$this->load->model('logs_model');
|
|
|
|
$this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code');
|
|
|
|
$this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code');
|
|
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -267,6 +268,12 @@ class infofix extends CI_Controller
|
|
|
|
$curl_rs = curl_exec($ch);
|
|
|
|
$curl_rs = curl_exec($ch);
|
|
|
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
|
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
|
|
if ($curl_rs && ($httpCode == 200 || $httpCode == 201)) {
|
|
|
|
if ($curl_rs && ($httpCode == 200 || $httpCode == 201)) {
|
|
|
|
|
|
|
|
// 先备份
|
|
|
|
|
|
|
|
$is = $this->infoContents_model->get_isid_by_icid($ic_id);
|
|
|
|
|
|
|
|
$ic = $this->infoContents_model->get_ic_contents2($ic_id);
|
|
|
|
|
|
|
|
$this->logs_model->backup($is->is_id, $ic->ic_content);
|
|
|
|
|
|
|
|
// 移除外部包裹标签
|
|
|
|
|
|
|
|
$curl_rs = str_replace(array('<my_lmr_tpl>', '</my_lmr_tpl>'), '', $curl_rs);
|
|
|
|
// 强制更新信息内容
|
|
|
|
// 强制更新信息内容
|
|
|
|
$this->infoContents_model->force_update($ic_id, $curl_rs);
|
|
|
|
$this->infoContents_model->force_update($ic_id, $curl_rs);
|
|
|
|
echo $curl_rs;
|
|
|
|
echo $curl_rs;
|
|
|
|