master
LMR 1 year ago
parent e14baeecfa
commit 76f1d93ce6

@ -10,6 +10,8 @@ class infofix extends CI_Controller
{
parent::__construct();
$this->load->model('Information_model');
$this->load->model('infoContents_model');
$this->load->model('logs_model');
$this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code');
}
@ -104,18 +106,29 @@ class infofix extends CI_Controller
// json参数
$site = $this->input->get_post('site');
$keys = $this->input->get_post('keys');
$keyArr = explode('@', $keys);
$keyArr = explode('@', $keys); // 250000343@oldurl@newurl@
sleep(3);
echo json_encode($keyArr);
sleep(2);
echo ($keys);
return true;
// 容错
if (empty($site) || empty($keys) || strpos($keys, '/') === false) {
if (empty($site) || count($keyArr) != 4 || strpos($keys, '/') === false) {
echo json_encode(array());
return false;
}
// 参数解析
$ic_id = $keyArr[0];
$oldStr = $keyArr[1];
$newStr = $keyArr[2];
$is_id = $keyArr[3];
// 先备份
//$this->logs_model->backup()
//$ic = $this->infoContents_model->get_ic_contents2($ic_id);
//$ic->info_content = mb_str_replace($oldStr, $newStr, $keyArr);
}
}

@ -799,7 +799,7 @@ class Information_model extends CI_Model
}
$search = ' AND (1=0 ' . $keysql . ')';
$sql = "
SELECT ic_id, ic_url, ic_content, m1.im_value AS amp_json, m2.im_value AS amp_body
SELECT is_id, ic_id, ic_url, ic_content, m1.im_value AS amp_json, m2.im_value AS amp_body
FROM infoStructures is1
INNER JOIN infoContents ic
ON ic.ic_id = is1.is_ic_id

Loading…
Cancel
Save