diff --git a/src/admin/dialog/select_images.php b/src/admin/dialog/select_images.php index 9a942769..e13f30c7 100644 --- a/src/admin/dialog/select_images.php +++ b/src/admin/dialog/select_images.php @@ -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.) { + } else if (typeof window.opener.CKEDITOR.instances[""] !== "undefined") { let addonHTML = ``; window.opener.CKEDITOR.instances[""].insertHtml(addonHTML); } diff --git a/src/admin/dialog/select_soft.php b/src/admin/dialog/select_soft.php index 1109522c..3ee9567d 100644 --- a/src/admin/dialog/select_soft.php +++ b/src/admin/dialog/select_soft.php @@ -60,19 +60,19 @@ a{text-decoration:none!important} return; } function ReturnValue(reimg) { - if (window.opener.document. != null) { - window.opener.document..value = reimg; - window.close(); - return - } var funcNum = ; if (window.opener.CKEDITOR != null && funcNum != 1) { window.opener.CKEDITOR.tools.callFunction(funcNum, reimg); } - if (window.opener.CKEDITOR.instances.) { + if (typeof window.opener.CKEDITOR.instances[""] !== "undefined") { let addonHTML = `附件:${reimg}`; window.opener.CKEDITOR.instances[""].insertHtml(addonHTML); } + if (window.opener.document. != null) { + window.opener.document..value = reimg; + window.close(); + return + } window.close(); } diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index c25f1a4d..7cb8e328 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -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'] = "\"对不起,没有上一图集了\"/"; } 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']; diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 896f6914..f973d575 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -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) { diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index 32066f86..0be328b0 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -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(); diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index 51f72bae..e64a87bf 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -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) { diff --git a/src/system/typelink/typelink.class.php b/src/system/typelink/typelink.class.php index 3a48f6ae..afa1f20e 100755 --- a/src/system/typelink/typelink.class.php +++ b/src/system/typelink/typelink.class.php @@ -96,12 +96,7 @@ class TypeLink //islink 表示返回的列表是否带连接 function GetPositionLink($islink = true) { - if (defined('DEDEMOB')) { - $indexpage = ""; - } else { - $indexpage = ""; - } - + $indexpage = ""; 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 表示“请选择类目”或“不限类目”