diff --git a/application/helpers/info_helper.php b/application/helpers/info_helper.php index 71e52c41..c392c9ae 100644 --- a/application/helpers/info_helper.php +++ b/application/helpers/info_helper.php @@ -368,4 +368,10 @@ function compress_css($buffer) /* remove tabs, spaces, newlines, etc. */ $buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer); return $buffer; +} + +//把临时多媒体中心预览图片地址替换为网前地址 +function replace_image_url($ic_content){ + $CI = &get_instance(); + return str_replace($CI->config->item('media_image_url'), $CI->config->item('site_image_url'),$ic_content); } \ No newline at end of file diff --git a/application/third_party/recommend/controllers/tips.php b/application/third_party/recommend/controllers/tips.php index dccf2cd0..42ca9e1c 100644 --- a/application/third_party/recommend/controllers/tips.php +++ b/application/third_party/recommend/controllers/tips.php @@ -77,7 +77,7 @@ class Tips extends CI_Controller $infoTip->it_title = $this->input->post('it_title'); $infoTip->it_expires = strtotime($this->input->post('it_expires')); $infoTip->it_code = $this->input->post('it_code'); - $infoTip->it_content = $this->input->post('it_content'); + $infoTip->it_content = replace_image_url($this->input->post('it_content')); $infoTip->it_datetime = time(); $infoTip->it_id = $this->infoTips_model->update('infoTips', $infoTip, 'it_id=' . $it_id); $data[] = array('name' => 'ok', 'value' => '保存成功!');