From 057506c230a5a2ffae0b3f30554cdd1df3218f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 14 May 2021 11:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=91=8A=E7=BC=96=E8=BE=91=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E5=A4=9A=E5=AA=92=E4=BD=93=E5=9B=BE=E7=89=87=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E9=A2=84=E8=A7=88=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/helpers/info_helper.php | 6 ++++++ application/third_party/recommend/controllers/tips.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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' => '保存成功!');