Browse Source

代码错误提示修正

tags/6.2.11
tianya 9 months ago
parent
commit
eba989c0d6
8 changed files with 19 additions and 14 deletions
  1. +3
    -3
      src/system/common.func.php
  2. +0
    -2
      src/system/dedemodule.class.php
  3. +1
    -1
      src/system/dedevote.class.php
  4. +2
    -2
      src/system/diyform.class.php
  5. +2
    -2
      src/system/taglib/arclist.lib.php
  6. +1
    -1
      src/system/taglib/relation.lib.php
  7. +8
    -1
      src/system/tpllib/plus_channel.php
  8. +2
    -2
      src/system/typelink/typeunit.class.menu.php

+ 3
- 3
src/system/common.func.php View File

@@ -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("/<img([^>]*)\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;


+ 0
- 2
src/system/dedemodule.class.php View File

@@ -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("文件或文件夹<span class='text-primary'>{$filename}</span>不存在,无法进行编译", "-1");
exit();
@@ -581,7 +580,6 @@ class DedeModule
function Clear()
{
unset($this->modules);
unset($this->fileList);
unset($this->fileListNames);
}
}//End Class

+ 1
- 1
src/system/dedevote.class.php View File

@@ -67,7 +67,7 @@ class DedeVote
*
* @access public
* @param int $aid 投票ID
* @return string
* @return void
*/
function AddVoteCount($aid)
{


+ 2
- 2
src/system/diyform.class.php View File

@@ -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()
{


+ 2
- 2
src/system/taglib/arclist.lib.php View File

@@ -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')
{


+ 1
- 1
src/system/taglib/relation.lib.php View File

@@ -69,7 +69,7 @@ function lib_relation(&$ctag, &$refObj)
if ($col > 1) $artlist .= "<td width='$colWidth'>\r\n";
if ($row = $dsql->GetArray("al")) {
if ($channelid > 0) {
$row['id'] = $row['id'];
$row['aid'] = $row['id'];
} else {
$row['id'] = $row['aid'];
}


+ 8
- 1
src/system/tpllib/plus_channel.php View File

@@ -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') {


+ 2
- 2
src/system/typelink/typeunit.class.menu.php View File

@@ -99,7 +99,7 @@ class TypeUnit
}
echo "<dl>\r\n";
echo "<dd><img onclick=\"LoadSuns('suns{$id}',{$id});\" style='cursor:pointer'></dd>\r\n";
echo "<dd><a href='catalog_do.php?cid=".$id."&dopost=listArchives'{$smenu}>".$typeName."</a></dd>\r\n";
echo "<dd><a href='catalog_do.php?cid=".$id."&dopost=listArchives'>".$typeName."</a></dd>\r\n";
echo "</dl>\r\n";
echo "<div id='suns".$id."'>";
if ($lastid == $id || $cfg_admin_channel == 'array') {
@@ -156,7 +156,7 @@ class TypeUnit
}
echo "<table>\r\n";
echo "<tr>\r\n";
echo "<td align='left'>".$step.$timg."<a href='catalog_do.php?cid=".$id."&dopost=listArchives'{$smenu}>".$typeName."</a></td>\r\n";
echo "<td align='left'>".$step."<a href='catalog_do.php?cid=".$id."&dopost=listArchives'>".$typeName."</a></td>\r\n";
echo "</tr>\r\n";
echo "</table>\r\n";
$this->LogicListAllSunType($id, $step." ", false);


Loading…
Cancel
Save