Browse Source

修复问题

tags/6.3.0
叙述、别离 6 months ago
parent
commit
9189dc9a9d
8 changed files with 8 additions and 17 deletions
  1. +1
    -1
      src/admin/catalog_add.php
  2. +0
    -4
      src/admin/freelist_add.php
  3. +0
    -4
      src/admin/freelist_edit.php
  4. +2
    -2
      src/admin/makehtml_taglist_action.php
  5. +0
    -1
      src/system/archive/specview.class.php
  6. +3
    -3
      src/system/archive/taglist.class.php
  7. +1
    -1
      src/system/helpers/channelunit.helper.php
  8. +1
    -1
      src/system/taglib/tag.lib.php

+ 1
- 1
src/admin/catalog_add.php View File

@@ -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");


+ 0
- 4
src/admin/freelist_add.php View File

@@ -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.' ';
}


+ 0
- 4
src/admin/freelist_edit.php View File

@@ -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.' ';
}


+ 2
- 2
src/admin/makehtml_taglist_action.php View File

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


+ 0
- 1
src/system/archive/specview.class.php View File

@@ -224,7 +224,6 @@ class SpecView
$murl = $makeFile;
$makeFile = $GLOBALS['cfg_basedir'].$makeFile;
$this->dtp->SaveTo($makeFile);
echo "成功创建:$murl<br>";
}
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";


+ 3
- 3
src/system/archive/taglist.class.php View File

@@ -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."/";
}


+ 1
- 1
src/system/helpers/channelunit.helper.php View File

@@ -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;
}


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

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


Loading…
Cancel
Save