|
|
|
@ -14,6 +14,7 @@ class Amplib {
|
|
|
|
|
$this->CI = & get_instance();
|
|
|
|
|
$this->CI->load->model('Information_model');
|
|
|
|
|
$this->CI->load->model('InfoMetas_model');
|
|
|
|
|
$this->CI->load->model('Logs_model');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function edit($ic_id) {
|
|
|
|
@ -88,6 +89,9 @@ class Amplib {
|
|
|
|
|
//CH的页面没有canonical内容,在这里帮补上
|
|
|
|
|
$textarea_htmlcode = str_replace('<!--@CANONICAL@-->', $this->CI->config->item('site_url') . $data['information']->ic_url, $textarea_htmlcode);
|
|
|
|
|
|
|
|
|
|
//备份修改的代码
|
|
|
|
|
$this->CI->Logs_model->write('backup_amp', $ic_id, $textarea_htmlcode);
|
|
|
|
|
|
|
|
|
|
//AMP格式验证
|
|
|
|
|
if ($amp_status !== '0') {//只有发布的时候才需要验证
|
|
|
|
|
//把AMP网页内容到purifycss处理,内置了AMP-Validator
|
|
|
|
|