帮ch页面添加canonical

hotfix/远程访问多媒体中心
尹诚诚 7 years ago
parent f2243469c1
commit 445b30b33b

@ -86,10 +86,14 @@ class Amp extends CI_Controller
$textarea_htmlcode = $this->input->post('textarea_htmlcode');
$amp_status = $this->input->post('amp_status');
$data['information'] = $this->Information_model->detail_by_ic_id($ic_id);
if ($data['information'] == FALSE) {
show_404();
}
//CH的页面没有canonical内容在这里帮补上
$textarea_htmlcode=str_replace('<!--@CANONICAL@-->', $data['information']->ic_url, $textarea_htmlcode);
$amp = $this->InfoMetas_model->get($ic_id, 'AMP');
if ($amp === false) {
$this->InfoMetas_model->add($ic_id, 'AMP', $textarea_htmlcode);

Loading…
Cancel
Save