From 4c3922105c7898bc27bd3ad929b499ef867f5500 Mon Sep 17 00:00:00 2001 From: tianya Date: Tue, 4 Jul 2023 21:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86=E7=B1=BB?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/{image.class.php => dedeimage.class.php} | 12 ++++++++---- src/system/dedetemplate.class.php | 6 +++--- src/system/helpers/image.helper.php | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) rename src/system/{image.class.php => dedeimage.class.php} (94%) diff --git a/src/system/image.class.php b/src/system/dedeimage.class.php similarity index 94% rename from src/system/image.class.php rename to src/system/dedeimage.class.php index 4e2bd104..04b25b12 100755 --- a/src/system/image.class.php +++ b/src/system/dedeimage.class.php @@ -3,13 +3,13 @@ if (!defined('DEDEINC')) exit ('dedebiz'); /** * 图像处理 * - * @version $id:image.class.php 18:10 2010年7月5日 tianya $ + * @version $id:dedeimage.class.php 18:10 2010年7月5日 tianya $ * @package DedeBIZ.Libraries * @copyright Copyright (c) 2022 DedeBIZ.COM * @license GNU GPL v2 (https://www.dedebiz.com/license) * @link https://www.dedebiz.com */ -class image +class DedeImage { var $attachinfo; var $targetfile; //图片路径 @@ -21,8 +21,12 @@ class image var $watermarktext; var $thumbstatus; var $watermarkstatus; + var $watermarkminwidth; + var $watermarkminheight; + var $watermarktype; + var $watermarktrans; //析构函数,兼容PHP4 - function image($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach = array()) + function DedeImage($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach = array()) { $this->__construct($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach); } @@ -76,7 +80,7 @@ class image { $this->thumb_gd($thumbwidth, $thumbheight, $preview); if ($this->thumbstatus == 2 && $this->watermarkstatus) { - $this->image( + $this->DedeImage( $this->targetfile, $this->attach, $this->watermarktext, diff --git a/src/system/dedetemplate.class.php b/src/system/dedetemplate.class.php index 770b8e89..412ae90b 100755 --- a/src/system/dedetemplate.class.php +++ b/src/system/dedetemplate.class.php @@ -30,7 +30,7 @@ function MakePublicTag($atts = array(), $refObj = '', $fields = array()) * * @access public * @param array $atts 属性 - * @param array $attlist 属性列表 + * @param string $attlist 属性列表 * @return void */ function FillAtts(&$atts, $attlist="") @@ -485,7 +485,7 @@ class DedeTemplate return; } $cAtt = new TagAttributeParse(); - $cAtt->CharToLow = TRUE; + $cAtt->charToLow = TRUE; //遍历模板字符串,请取标记及其属性信息 $t = 0; $preTag = ''; @@ -883,7 +883,7 @@ class DedeTemplate * 编译if标记 * * @access public - * @param string $cTag 标签 + * @param object $cTag 标签 * @return string */ function Compilerif ($cTag) diff --git a/src/system/helpers/image.helper.php b/src/system/helpers/image.helper.php index c63696c9..e68b49fa 100755 --- a/src/system/helpers/image.helper.php +++ b/src/system/helpers/image.helper.php @@ -76,7 +76,7 @@ if (!function_exists('WaterImg')) { function WaterImg($srcFile, $fromGo = 'up') { include(DEDEDATA.'/mark/inc_photowatermark_config.php'); - require_once(DEDEINC.'/image.class.php'); + require_once(DEDEINC.'/dedeimage.class.php'); if (isset($GLOBALS['needwatermark'])) { $photo_markup = $photo_markdown = empty($GLOBALS['needwatermark']) ? '0' : '1'; } @@ -119,7 +119,7 @@ if (!function_exists('WaterImg')) { $cfg_watermarktext['shadowy'] = '0'; $cfg_watermarktext['shadowcolor'] = '0,0,0'; $photo_marktrans = 85; - $img = new image($srcFile, 0, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $photo_marktype, $photo_marktrans, $TRUEMarkimg); + $img = new DedeImage($srcFile, 0, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $photo_marktype, $photo_marktrans, $TRUEMarkimg); $img->watermark(0); } }