Browse Source

Merge branch 'develop' of https://www.zhelixie.com/DedeBIZ/DedeCMSV6 into develop

tags/6.1.7
xushubieli 2 years ago
parent
commit
803aab41fa
7 changed files with 49 additions and 117 deletions
  1. +1
    -1
      src/admin/dialog/select_images.php
  2. +6
    -6
      src/admin/dialog/select_soft.php
  3. +30
    -44
      src/system/archive/archives.class.php
  4. +0
    -24
      src/system/archive/listview.class.php
  5. +0
    -3
      src/system/archive/searchview.class.php
  6. +0
    -18
      src/system/archive/sglistview.class.php
  7. +12
    -21
      src/system/typelink/typelink.class.php

+ 1
- 1
src/admin/dialog/select_images.php View File

@@ -118,7 +118,7 @@ a{text-decoration:none!important}
window.opener.document.getElementById('litPic').src = reimg;
}
if (document.all) window.opener = true;
} else if (window.opener.CKEDITOR.instances.<?php echo $f ?>) {
} else if (typeof window.opener.CKEDITOR.instances["<?php echo $f ?>"] !== "undefined") {
let addonHTML = `<img src='${reimg}'>`;
window.opener.CKEDITOR.instances["<?php echo $f ?>"].insertHtml(addonHTML);
}


+ 6
- 6
src/admin/dialog/select_soft.php View File

@@ -60,19 +60,19 @@ a{text-decoration:none!important}
return;
}
function ReturnValue(reimg) {
if (window.opener.document.<?php echo $f ?> != null) {
window.opener.document.<?php echo $f ?>.value = reimg;
window.close();
return
}
var funcNum = <?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1; ?>;
if (window.opener.CKEDITOR != null && funcNum != 1) {
window.opener.CKEDITOR.tools.callFunction(funcNum, reimg);
}
if (window.opener.CKEDITOR.instances.<?php echo $f ?>) {
if (typeof window.opener.CKEDITOR.instances["<?php echo $f ?>"] !== "undefined") {
let addonHTML = `<a href='${reimg}' target='_blank'><img src='<?php echo $cfg_cmspath ?>/static/web/img/addon.gif'>附件:${reimg}</a>`;
window.opener.CKEDITOR.instances["<?php echo $f ?>"].insertHtml(addonHTML);
}
if (window.opener.document.<?php echo $f ?> != null) {
window.opener.document.<?php echo $f ?>.value = reimg;
window.close();
return
}
window.close();
}
</script>


+ 30
- 44
src/system/archive/archives.class.php View File

@@ -465,14 +465,8 @@ class Archives
$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/article_spec.htm";
}
}
if (defined('DEDEMOB')) {
$tmpfile = str_replace('.htm', '_m.htm', $tmpfile);
}
if (!file_exists($tmpfile)) {
$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid == 'spec' ? 'article_spec.htm' : 'article_default.htm');
if (defined('DEDEMOB')) {
$tmpfile = str_replace('.htm', '_m.htm', $tmpfile);
}
}
if (!preg_match("#.htm$#", $tmpfile)) return FALSE;
return $tmpfile;
@@ -695,25 +689,21 @@ class Archives
$nextRow = $this->dsql->GetOne($query.$next);
$preRow = $this->dsql->GetOne($query.$pre);
if (is_array($preRow)) {
if (defined('DEDEMOB')) {
$mlink = 'view.php?aid='.$preRow['id'];
} else {
$mlink = GetFileUrl(
$preRow['id'],
$preRow['typeid'],
$preRow['senddate'],
$preRow['title'],
$preRow['ismake'],
$preRow['arcrank'],
$preRow['namerule'],
$preRow['typedir'],
$preRow['money'],
$preRow['filename'],
$preRow['moresite'],
$preRow['siteurl'],
$preRow['sitepath']
);
}
$mlink = GetFileUrl(
$preRow['id'],
$preRow['typeid'],
$preRow['senddate'],
$preRow['title'],
$preRow['ismake'],
$preRow['arcrank'],
$preRow['namerule'],
$preRow['typedir'],
$preRow['money'],
$preRow['filename'],
$preRow['moresite'],
$preRow['siteurl'],
$preRow['sitepath']
);
//二次开发上一篇属性
$preRow['litpic'] = (empty($preRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg' : $preRow['litpic'];
$this->PreNext['diy']['pre']['id'] = $preRow['id'];
@@ -728,25 +718,21 @@ class Archives
$this->PreNext['preimg'] = "<img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有上一图集了\"/>";
}
if (is_array($nextRow)) {
if (defined('DEDEMOB')) {
$mlink = 'view.php?aid='.$preRow['id'];
} else {
$mlink = GetFileUrl(
$nextRow['id'],
$nextRow['typeid'],
$nextRow['senddate'],
$nextRow['title'],
$nextRow['ismake'],
$nextRow['arcrank'],
$nextRow['namerule'],
$nextRow['typedir'],
$nextRow['money'],
$nextRow['filename'],
$nextRow['moresite'],
$nextRow['siteurl'],
$nextRow['sitepath']
);
}
$mlink = GetFileUrl(
$nextRow['id'],
$nextRow['typeid'],
$nextRow['senddate'],
$nextRow['title'],
$nextRow['ismake'],
$nextRow['arcrank'],
$nextRow['namerule'],
$nextRow['typedir'],
$nextRow['money'],
$nextRow['filename'],
$nextRow['moresite'],
$nextRow['siteurl'],
$nextRow['sitepath']
);
//二次开发下一篇属性
$nextRow['litpic'] = (empty($nextRow['litpic'])) ? $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg' : $nextRow['litpic'];
$this->PreNext['diy']['next']['id'] = $nextRow['id'];


+ 0
- 24
src/system/archive/listview.class.php View File

@@ -232,14 +232,8 @@ class ListView
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist'];
$tempfile = str_replace("{tid}", $this->TypeID, $tempfile);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
if (!file_exists($tempfile) || !is_file($tempfile)) {
echo "模板文件不存在,无法解析文档";
@@ -357,14 +351,8 @@ class ListView
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
$tempfile = $tmpdir."/".$tempfile;
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
$this->dtp->LoadTemplate($tempfile);
}
@@ -388,14 +376,8 @@ class ListView
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
$tempfile = $tmpdir."/".$tempfile;
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
$this->PartView->SetTemplet($tempfile);
} else if ($this->Fields['ispart'] == 2) {
@@ -433,14 +415,8 @@ class ListView
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
$tempfile = $tmpdir."/".$tempfile;
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
$this->PartView->SetTemplet($tempfile);
} else if ($this->Fields['ispart'] == 2) {


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

@@ -114,9 +114,6 @@ class SearchView
}
$this->CountRecord();
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/search.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile) || !is_file($tempfile)) {
echo "模板文件不存在,无法解析";
exit();


+ 0
- 18
src/system/archive/sglistview.class.php View File

@@ -182,14 +182,8 @@ class SgListView
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist'];
$tempfile = str_replace("{tid}", $this->TypeID, $tempfile);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default_sg.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
if (!file_exists($tempfile) || !is_file($tempfile)) {
echo "模板文件不存在,无法解析文档";
@@ -333,14 +327,8 @@ class SgListView
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
$tempfile = $tmpdir."/".$tempfile;
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
$this->PartView->SetTemplet($tempfile);
} else if ($this->Fields['ispart'] == 2) {
@@ -377,14 +365,8 @@ class SgListView
$tempfile = str_replace("{tid}", $this->TypeID, $this->Fields['tempindex']);
$tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);
$tempfile = $tmpdir."/".$tempfile;
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
if (!file_exists($tempfile)) {
$tempfile = $tmpdir."/".$GLOBALS['cfg_df_style']."/index_default_sg.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
$this->PartView->SetTemplet($tempfile);
} else if ($this->Fields['ispart'] == 2) {


+ 12
- 21
src/system/typelink/typelink.class.php View File

@@ -96,12 +96,7 @@ class TypeLink
//islink 表示返回的列表是否带连接
function GetPositionLink($islink = true)
{
if (defined('DEDEMOB')) {
$indexpage = "<li class='breadcrumb-item'><a href='index.php'>".$this->indexName."</a></li>";
} else {
$indexpage = "<li class='breadcrumb-item'><a href='".$this->indexUrl."'>".$this->indexName."</a></li>";
}
$indexpage = "<li class='breadcrumb-item'><a href='".$this->indexUrl."'>".$this->indexName."</a></li>";
if ($this->valuePosition != "" && $islink) {
return $this->valuePosition;
} else if ($this->valuePositionName != "" && !$islink) {
@@ -162,21 +157,17 @@ class TypeLink
//获得某分类连接的URL
function GetOneTypeUrl($typeinfos)
{
if (defined('DEDEMOB')) {
return 'list.php?tid='.$typeinfos['id'];
} else {
return GetTypeUrl(
$typeinfos['id'],
MfTypedir($typeinfos['typedir']),
$typeinfos['isdefault'],
$typeinfos['defaultname'],
$typeinfos['ispart'],
$typeinfos['namerule2'],
$typeinfos['moresite'],
$typeinfos['siteurl'],
$typeinfos['sitepath']
);
}
return GetTypeUrl(
$typeinfos['id'],
MfTypedir($typeinfos['typedir']),
$typeinfos['isdefault'],
$typeinfos['defaultname'],
$typeinfos['ispart'],
$typeinfos['namerule2'],
$typeinfos['moresite'],
$typeinfos['siteurl'],
$typeinfos['sitepath']
);
}
//获得类别列表
//hid 是指默认选中类目,0 表示“请选择类目”或“不限类目”


Loading…
Cancel
Save