From eba989c0d659680bdca84364dfa24d174acecf0b Mon Sep 17 00:00:00 2001 From: tianya Date: Tue, 4 Jul 2023 21:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/common.func.php | 6 +++--- src/system/dedemodule.class.php | 2 -- src/system/dedevote.class.php | 2 +- src/system/diyform.class.php | 4 ++-- src/system/taglib/arclist.lib.php | 4 ++-- src/system/taglib/relation.lib.php | 2 +- src/system/tpllib/plus_channel.php | 9 ++++++++- src/system/typelink/typeunit.class.menu.php | 4 ++-- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/system/common.func.php b/src/system/common.func.php index bec2b50b..efb67d53 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -73,7 +73,7 @@ if (version_compare(PHP_VERSION, '7.0.0', '>=')) { } } if (!function_exists('mysql_error') and function_exists('mysqli_connect_error')) { - function mysql_error($link='') + function mysql_error($link) { if (mysqli_connect_errno()) { return mysqli_connect_error(); @@ -293,7 +293,7 @@ function dede_htmlspecialchars($str) * * @access public * @param string - * @return string + * @return void */ function helpers($helpers) { @@ -569,8 +569,8 @@ if (!function_exists('obtainimgs')) { { preg_match_all("/]*)\s*src=('|\")([^'\"]+)('|\")/", $string, $matches); $imgsrc_arr = array_unique($matches[3]); - $count = count($imgsrc_arr); $i = 0; + $result = ""; foreach($imgsrc_arr as $imgsrc) { if ($i == $num) break; diff --git a/src/system/dedemodule.class.php b/src/system/dedemodule.class.php index 1ed024cb..34062677 100755 --- a/src/system/dedemodule.class.php +++ b/src/system/dedemodule.class.php @@ -525,7 +525,6 @@ class DedeModule if (isset($this->fileListNames[$f])) return; else if (preg_match("/Thumbs\.db/i", $f)) return; else $this->fileListNames[$f] = 1; - $fileList = ''; if (!file_exists($filename)) { ShowMsg("文件或文件夹{$filename}不存在,无法进行编译", "-1"); exit(); @@ -581,7 +580,6 @@ class DedeModule function Clear() { unset($this->modules); - unset($this->fileList); unset($this->fileListNames); } }//End Class diff --git a/src/system/dedevote.class.php b/src/system/dedevote.class.php index 29f83eff..eb35ef5d 100755 --- a/src/system/dedevote.class.php +++ b/src/system/dedevote.class.php @@ -67,7 +67,7 @@ class DedeVote * * @access public * @param int $aid 投票ID - * @return string + * @return void */ function AddVoteCount($aid) { diff --git a/src/system/diyform.class.php b/src/system/diyform.class.php index d86b6998..09e4a31e 100755 --- a/src/system/diyform.class.php +++ b/src/system/diyform.class.php @@ -75,7 +75,7 @@ class diyform if ($type == 'post') { $formstring .= $func($tag, $admintype); } else { - $formstring .= $func($tag, dede_htmlspecialchars($value[$tag->GetName()], ENT_QUOTES), $admintype); + $formstring .= $func($tag, dede_htmlspecialchars($value[$tag->GetName()]), $admintype); } $formfields .= $formfields == '' ? $tag->GetName().','.$tag->GetAtt('type') : ';'.$tag->GetName().','.$tag->GetAtt('type'); } @@ -89,7 +89,7 @@ class diyform * 获取字段列表 * * @access public - * @return string + * @return array */ function getFieldList() { diff --git a/src/system/taglib/arclist.lib.php b/src/system/taglib/arclist.lib.php index c3503c01..cbfc66c7 100755 --- a/src/system/taglib/arclist.lib.php +++ b/src/system/taglib/arclist.lib.php @@ -313,7 +313,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele $ids[] = $row['id']; //处理一些特殊字段 $row['info'] = $row['infos'] = cn_substr($row['description'], $infolen); - $row['id'] = $row['id']; + $row['aid'] = $row['id']; if ($row['corank'] > 0 && $row['arcrank'] == 0) { $row['arcrank'] = $row['corank']; } @@ -476,7 +476,7 @@ function lib_GetAutoChannelID($sortid, $topid) * @param array $list 查询结果 * @param string $field 排序的字段名 * @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 - * @return array + * @return mixed */ function list_sort_by($list, $field, $sortby = 'asc') { diff --git a/src/system/taglib/relation.lib.php b/src/system/taglib/relation.lib.php index 137fb79f..6107f969 100644 --- a/src/system/taglib/relation.lib.php +++ b/src/system/taglib/relation.lib.php @@ -69,7 +69,7 @@ function lib_relation(&$ctag, &$refObj) if ($col > 1) $artlist .= "\r\n"; if ($row = $dsql->GetArray("al")) { if ($channelid > 0) { - $row['id'] = $row['id']; + $row['aid'] = $row['id']; } else { $row['id'] = $row['aid']; } diff --git a/src/system/tpllib/plus_channel.php b/src/system/tpllib/plus_channel.php index b4070084..f45499ba 100755 --- a/src/system/tpllib/plus_channel.php +++ b/src/system/tpllib/plus_channel.php @@ -10,6 +10,14 @@ if (!defined('DEDEINC')) exit ('dedebiz'); * @link https://www.dedebiz.com */ require_once(DEDEINC.'/channelunit.func.php'); +/** + * plus_channel + * + * @param array $atts + * @param object $refObj + * @param mixed $fields + * @return array + */ function plus_channel(&$atts, &$refObj, &$fields) { global $dsql, $_vars; @@ -37,7 +45,6 @@ function plus_channel(&$atts, &$refObj, &$fields) $typeid = $row2['id']; $reid = $row2['reid']; $topid = $row2['topid']; - $issetInfos = true; } if ($type == '' || $type == 'sun') $type = 'son'; if ($type == 'top') { diff --git a/src/system/typelink/typeunit.class.menu.php b/src/system/typelink/typeunit.class.menu.php index 9c2cab02..59250cec 100755 --- a/src/system/typelink/typeunit.class.menu.php +++ b/src/system/typelink/typeunit.class.menu.php @@ -99,7 +99,7 @@ class TypeUnit } echo "
\r\n"; echo "
\r\n"; - echo "
".$typeName."
\r\n"; + echo "
".$typeName."
\r\n"; echo "
\r\n"; echo "
"; if ($lastid == $id || $cfg_admin_channel == 'array') { @@ -156,7 +156,7 @@ class TypeUnit } echo "\r\n"; echo "\r\n"; - echo "\r\n"; + echo "\r\n"; echo "\r\n"; echo "
".$step.$timg."".$typeName."".$step."".$typeName."
\r\n"; $this->LogicListAllSunType($id, $step." ", false);