From 75bb9b1376759700baf402232014d08f16098ec4 Mon Sep 17 00:00:00 2001 From: tianya Date: Wed, 26 Mar 2025 22:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtags=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/archive/taglist.class.php | 11 ++++------- src/system/taglib/arclist.lib.php | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index dc6a8bdf..ee247dcf 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -64,11 +64,13 @@ class TagList ShowMsg('当前标签不存在,系统自动返回主页', '/'); exit(); } + $this->Fields['keywords'] = empty($this->Fields['keywords'])? "" : $this->Fields['keywords']; + $this->Fields['description'] = empty($this->Fields['description'])? "" : $this->Fields['description']; $this->Fields['title'] = empty($this->TagInfos['title']) ? $this->TagInfos['tag'] : $this->TagInfos['title']; $this->Fields['keywords'] = empty($this->TagInfos['keywords']) ? $this->Fields['keywords'] : $this->TagInfos['keywords']; $this->Fields['description'] = empty($this->TagInfos['description']) ? $this->Fields['description'] : $this->TagInfos['description']; $addInfos = $this->dsql->GetOne("SELECT * FROM `#@__tagindex_infos` WHERE tagid='{$this->Tag}' "); - $this->Fields['litpic'] = empty($addInfos['litpic']) ? $addInfos['litpic'] : $addInfos['litpic']; + if(is_array($addInfos)) $this->Fields['litpic'] = empty($addInfos['litpic']) ? $addInfos['litpic'] : $addInfos['litpic']; } //初始化模板 $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style'].'/'.$this->Templet; @@ -547,12 +549,7 @@ class TagList $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; $purl = $this->GetCurUrl(); //开启伪静态对规则替换 - if ($cfg_rewrite == 'Y') { - $purl = str_replace("/apps", "", $purl); - $nowurls = preg_replace("/", ".php?", $purl); - $nowurls = explode("?", $nowurls); - $purl = $nowurls[0]; - } + if ($cfg_rewrite == 'Y') $purl = "/tags/"; $purl .= "?/".urlencode($this->Tag); //获得上页和下页的链接 if ($this->PageNo != 1) { diff --git a/src/system/taglib/arclist.lib.php b/src/system/taglib/arclist.lib.php index fd728bd4..9ff5a43c 100755 --- a/src/system/taglib/arclist.lib.php +++ b/src/system/taglib/arclist.lib.php @@ -32,7 +32,7 @@ function lib_arclist(&$ctag, &$refObj) $tagid = $ctag->GetAtt('tagid'); } //arclist是否需要weight排序,默认为N,如果需要排序则设置为Y - $weight = $ctag->GetAtt('weight'); + $isweight = $ctag->GetAtt('weight'); if ($tagname == 'imglist' || $tagname == 'imginfolist') { $listtype = 'image'; } else if ($tagname == 'specart') { @@ -72,7 +72,7 @@ function lib_arclist(&$ctag, &$refObj) } else { $flag = $ctag->GetAtt('att'); } - return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid, $pagesize,$isweight, $ctag->GetAtt('notypeid') + return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid, $pagesize, $isweight, $ctag->GetAtt('notypeid') ); } /**