浏览代码

代码优化

tags/6.1.8
tianya 3 年前
父节点
当前提交
04500370c1
共有 6 个文件被更改,包括 6 次插入14 次删除
  1. +1
    -1
      src/admin/catalog_add.php
  2. +2
    -2
      src/admin/dialog/select_images.php
  3. +0
    -1
      src/admin/inc/inc_archives_functions.php
  4. +0
    -6
      src/system/archives.func.php
  5. +3
    -3
      src/system/helpers/archive.helper.php
  6. +0
    -1
      src/user/inc/inc_archives_functions.php

+ 1
- 1
src/admin/catalog_add.php 查看文件

@@ -51,7 +51,7 @@ else if ($dopost == 'savequick') {
$templist = "{style}/list_{$nid}.htm";
$temparticle = "{style}/article_{$nid}.htm";
$queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,namegk,enname,ennamegk,bigpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`)
VALUES('~reid~','~topid~','~rank~','~typename~','~namegk~','~enname~','~ennamegk~','~bigpic~','~litimg~','~typedir~','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')";
VALUES('~reid~','~topid~','~rank~','~typename~','','','','','','~typedir~','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')";
if (empty($savetype)) {
foreach ($_POST as $k => $v) {
if (preg_match("#^posttype#", $k)) {


+ 2
- 2
src/admin/dialog/select_images.php 查看文件

@@ -19,8 +19,8 @@ if (empty($imgstick)) {
$noeditor = isset($noeditor) ? $noeditor : '';
$activepath = str_replace('.', '', $activepath);
$activepath = preg_replace("#\/{1,}#", '/', $activepath);
if (strlen($activepath) < strlen($cfg_medias_dir)) {
$activepath = $cfg_medias_dir;
if (strlen($activepath) < strlen($cfg_image_dir)) {
$activepath = $cfg_image_dir;
}
$inpath = $cfg_basedir.$activepath;
$activeurl = '..'.$activepath;


+ 0
- 1
src/admin/inc/inc_archives_functions.php 查看文件

@@ -10,7 +10,6 @@
*/
require_once(DEDEINC.'/libraries/dedehttpdown.class.php');
require_once(DEDEINC.'/image.func.php');
require_once(DEDEINC.'/archives.func.php');
require_once(DEDEINC.'/archive/partview.class.php');
$backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '';
$backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn btn-success btn-sm'>记忆的列表页</a> &nbsp;" : '';


+ 0
- 6
src/system/archives.func.php 查看文件

@@ -1,6 +0,0 @@
<?php
if (!defined('DEDEINC')) exit('dedebiz');
//为了兼容旧版本文件,这里将函数直接封装到archive小助手中
//所以这里仅做一个文件引入映射,今后的开发,如果遇到此类函数
//在开发过程中直接使用helper('archive');即可
helper('archive');

+ 3
- 3
src/system/helpers/archive.helper.php 查看文件

@@ -87,11 +87,11 @@ if (!function_exists('GetChannelTable')) {
{
global $dsql;
if ($formtype == 'archive') {
$query = "SELECT ch.maintable, ch.addtable FROM #@__arctiny tin LEFT JOIN #@__channeltype ch ON ch.id=tin.channel WHERE tin.id='$id'";
$query = "SELECT ch.maintable, ch.addtable FROM `#@__arctiny` tin LEFT JOIN `#@__channeltype` ch ON ch.id=tin.channel WHERE tin.id='$id'";
} else if ($formtype == 'typeid') {
$query = "SELECT ch.maintable, ch.addtable FROM #@__arctype act LEFT JOIN #@__channeltype ch ON ch.id=act.channeltype WHERE act.id='$id'";
$query = "SELECT ch.maintable, ch.addtable FROM `#@__arctype` act LEFT JOIN `#@__channeltype` ch ON ch.id=act.channeltype WHERE act.id='$id'";
} else {
$query = "SELECT maintable, addtable FROM #@__channeltype WHERE id='$id'";
$query = "SELECT maintable, addtable FROM `#@__channeltype` WHERE id='$id'";
}
$row = $dsql->GetOne($query);
return $row;


+ 0
- 1
src/user/inc/inc_archives_functions.php 查看文件

@@ -10,7 +10,6 @@
*/
if (!defined('DEDEMEMBER')) exit('dedebiz');
require_once(DEDEINC.'/image.func.php');
require_once(DEDEINC.'/archives.func.php');
require_once(DEDEINC."/userlogin.class.php");
//检查用户是否被禁言
CheckNotAllow();


正在加载...
取消
保存