diff --git a/application/controllers/information.php b/application/controllers/information.php index 8d985390..106e273e 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -363,7 +363,14 @@ class Information extends CI_Controller } echo json_encode($data); } else { - $this->InfoContents_model->Update($information->is_ic_id, $this->input->post('ic_url'), $this->input->post('ic_url_title'), $this->input->post('ic_type'), $this->input->post('ic_title'), $this->input->post('ic_content'), $this->input->post('ic_summary'), $this->input->post('ic_seo_title'), $this->input->post('ic_seo_description'), $this->input->post('ic_seo_keywords'), $this->input->post('ic_show_bread_crumbs'), $this->input->post('ic_status'), $this->input->post('ic_template'), $this->input->post('ic_photo'), $this->input->post('ic_photo_width'), $this->input->post('ic_photo_height'), $this->input->post('ic_recommend_tours'), $this->input->post('ic_recommend_packages'), $this->input->post('ic_ht_area_id'), $this->input->post('ic_ht_area_type'), $this->input->post('ic_ht_product_id'), $this->input->post('ic_ht_product_type'), $this->input->post('ic_author')); + $ic_content = $this->input->post('ic_content'); + if (strcasecmp($this->config->item('site_code'), "chinatravel") == 0){ //ct站替换中国大陆的英文 + if (stripos($ic_content, 'mainland china') !== false){ + $ic_content = str_ireplace('mainland china','the mainland of china',$ic_content); + } + } + + $this->InfoContents_model->Update($information->is_ic_id, $this->input->post('ic_url'), $this->input->post('ic_url_title'), $this->input->post('ic_type'), $this->input->post('ic_title'), $ic_content, $this->input->post('ic_summary'), $this->input->post('ic_seo_title'), $this->input->post('ic_seo_description'), $this->input->post('ic_seo_keywords'), $this->input->post('ic_show_bread_crumbs'), $this->input->post('ic_status'), $this->input->post('ic_template'), $this->input->post('ic_photo'), $this->input->post('ic_photo_width'), $this->input->post('ic_photo_height'), $this->input->post('ic_recommend_tours'), $this->input->post('ic_recommend_packages'), $this->input->post('ic_ht_area_id'), $this->input->post('ic_ht_area_type'), $this->input->post('ic_ht_product_id'), $this->input->post('ic_ht_product_type'), $this->input->post('ic_author')); //AMP更新和生成 beign $auto_update_amp = $this->input->get_post('auto_update_amp'); @@ -447,7 +454,7 @@ class Information extends CI_Controller } $data[] = array('name' => 'ok', 'value' => $this->lang->line('form_info_success'), 'update_info_log' => $update_info_log); - $this->Logs_model->backup($information->is_id, $this->input->post('ic_content')); + $this->Logs_model->backup($information->is_id, $ic_content); $this->Logs_model->backup_summary($information->is_id, $this->input->post('ic_summary')); //作者个人页面更新