From 9189dc9a9da58edd3f201e6829f1ac396edaad8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <2449271624@qq.com> Date: Fri, 13 Oct 2023 17:56:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/catalog_add.php | 2 +- src/admin/freelist_add.php | 4 ---- src/admin/freelist_edit.php | 4 ---- src/admin/makehtml_taglist_action.php | 4 ++-- src/system/archive/specview.class.php | 1 - src/system/archive/taglist.class.php | 6 +++--- src/system/helpers/channelunit.helper.php | 2 +- src/system/taglib/tag.lib.php | 2 +- 8 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/admin/catalog_add.php b/src/admin/catalog_add.php index 454f4034..3c5445a1 100644 --- a/src/admin/catalog_add.php +++ b/src/admin/catalog_add.php @@ -166,7 +166,7 @@ if ($dopost == 'quick') { } //创建目录 if ($ispart != 2) { - $true_typedir = str_replace("{cmspath}", $typedir); + $true_typedir = str_replace("{cmspath}", "", $typedir); $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); if (!CreateDir($true_typedir)) { ShowMsg("创建目录{$true_typedir}失败,请检查您的路径是否存在问题", "-1"); diff --git a/src/admin/freelist_add.php b/src/admin/freelist_add.php index 04a7890a..813dad3c 100644 --- a/src/admin/freelist_add.php +++ b/src/admin/freelist_add.php @@ -24,10 +24,6 @@ if (empty($dopost)) { ShowMsg("请输入自由列表标题", "-1"); exit(); } - if (empty($channel)) { - showmsg("请选择一个限定模型", "-1"); - exit(); - } if (is_array($types)) { foreach ($types as $v) $ntype .= $v.' '; } diff --git a/src/admin/freelist_edit.php b/src/admin/freelist_edit.php index 52dd365d..5786b796 100644 --- a/src/admin/freelist_edit.php +++ b/src/admin/freelist_edit.php @@ -30,10 +30,6 @@ if (empty($dopost)) { ShowMsg("请输入自由列表标题", "-1"); exit(); } - if (empty($channel)) { - showmsg("请选择一个限定模型", "-1"); - exit(); - } if (is_array($types)) { foreach ($types as $v) $ntype .= $v.' '; } diff --git a/src/admin/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php index 45b86f7f..c4e02a2f 100644 --- a/src/admin/makehtml_taglist_action.php +++ b/src/admin/makehtml_taglist_action.php @@ -20,7 +20,7 @@ if (empty($maxpagesize)) $maxpagesize = 30; $startid = isset($startid) ? intval($startid) : 0; $endid = isset($endid) ? intval($endid) : 0; $tagid = isset($tagid) ? intval($tagid) : 0; -$tagsdir = str_replace("{cmspath}", $cfg_tags_dir); +$tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); //生成 if ($tagid > 0) { $upall = 0; //更新单个模式 @@ -50,7 +50,7 @@ if ($ctagid == 0 && $allfinish) { } $tag = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id='$ctagid' LIMIT 0,1;"); //创建TAGS目录 -$tagsDir = str_replace("{cmspath}", $cfg_tags_dir); +$tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); MkdirAll($cfg_basedir.$tagsDir, $cfg_dir_purview); if (is_array($tag) && count($tag) > 0) { $dlist = new TagList($tag['id'], 'taglist.htm'); diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index 27670442..055187d3 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -224,7 +224,6 @@ class SpecView $murl = $makeFile; $makeFile = $GLOBALS['cfg_basedir'].$makeFile; $this->dtp->SaveTo($makeFile); - echo "成功创建:$murl
"; } copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html"); $murl = $GLOBALS['cfg_special']."/index.html"; diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index f51475aa..db05717c 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -151,7 +151,7 @@ class TagList function Display() { global $cfg_tags_dir; - $tagsDir = str_replace("{cmspath}", $cfg_tags_dir); + $tagsDir = str_replace("{cmspath}", "", $cfg_tags_dir); $makeDir = empty($this->Tag) ? $this->GetTruePath().$tagsDir."/index.html" : $this->GetTruePath().$tagsDir."/".$this->Tag."/index.html"; if ($this->Tag != '') { $this->CountRecord(); @@ -554,7 +554,7 @@ class TagList function SetTagsDir($dir = '') { global $cfg_tags_dir; - if ($dir == "") $dir = str_replace("{cmspath}", $cfg_tags_dir); + if ($dir == "") $dir = str_replace("{cmspath}", "", $cfg_tags_dir); $this->tagsDir = $dir; } //生成静态Tag @@ -562,7 +562,7 @@ class TagList { global $cfg_dir_purview, $envs, $cfg_tags_dir, $cfg_cmsurl; $envs['makeTag'] = 1; - $tagsdir = str_replace("{cmspath}", $cfg_tags_dir); + $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); if (isset($envs['makeTag']) && $envs['makeTag'] == 1) { $this->Fields['position'] = $cfg_cmsurl.$tagsdir."/"; } diff --git a/src/system/helpers/channelunit.helper.php b/src/system/helpers/channelunit.helper.php index ebef1964..3cefc3cc 100755 --- a/src/system/helpers/channelunit.helper.php +++ b/src/system/helpers/channelunit.helper.php @@ -365,7 +365,7 @@ function GetSonIdsLogic($id, $sArr, $channel = 0, $addthis = false) function MfTypedir($typedir) { if (preg_match("/^(http|https|ftp):/i", $typedir)) return $typedir; - $typedir = str_replace("{cmspath}", "/", $typedir); + $typedir = str_replace("{cmspath}", "", $typedir); $typedir = preg_replace("/\/{1,}/", "/", $typedir); return $typedir; } diff --git a/src/system/taglib/tag.lib.php b/src/system/taglib/tag.lib.php index 722edd67..01464447 100755 --- a/src/system/taglib/tag.lib.php +++ b/src/system/taglib/tag.lib.php @@ -22,7 +22,7 @@ function lib_tag(&$ctag, &$refObj) $ltype = $sort; $num = $row; $addsql = "WHERE 1=1"; - $tagsdir = str_replace("{cmspath}", $cfg_tags_dir); + $tagsdir = str_replace("{cmspath}", "", $cfg_tags_dir); if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); $dsql->Execute();