Browse Source

修正dedecms5.8 文章集 发布后无法修改缩略图错误

tags/6.0.0
tianya 3 years ago
parent
commit
2873da138b
1 changed files with 17 additions and 1 deletions
  1. +17
    -1
      src/dede/article_edit.php

+ 17
- 1
src/dede/article_edit.php View File

@@ -71,6 +71,7 @@ else if($dopost=='save')
if(!isset($remote)) $remote = 0;
if(!isset($dellink)) $dellink = 0;
if(!isset($autolitpic)) $autolitpic = 0;
if(empty($litpic_b64)) $litpic_b64 = '';
if(empty($typeid))
{
@@ -164,6 +165,22 @@ else if($dopost=='save')
}
}
// 处理新的缩略图上传
if ($litpic_b64 != "") {
$data = explode( ',', $litpic_b64 );
$ntime = time();
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime);
CreateDir($savepath);
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999));
$fullUrl = $fullUrl.".png";
file_put_contents($cfg_basedir.$fullUrl, base64_decode( $data[ 1 ] ));
// 加水印
WaterImg($cfg_basedir.$fullUrl, 'up');
$litpic = $fullUrl;
}
//处理图片文档的自定义属性
if($litpic!='' && !preg_match("#p#", $flag))
{
@@ -192,7 +209,6 @@ else if($dopost=='save')
source='$source',
litpic='$litpic',
pubdate='$pubdate',
voteid='$voteid',
notpost='$notpost',
description='$description',
keywords='$keywords',


Loading…
Cancel
Save