Browse Source

移除无效资源

tags/6.1.9
tianya 7 months ago
parent
commit
f1c02da017
4 changed files with 0 additions and 46 deletions
  1. +0
    -32
      src/admin/config.php
  2. +0
    -2
      src/admin/login.php
  3. +0
    -1
      src/admin/module_main.php
  4. +0
    -11
      src/data/admin/config_update.php

+ 0
- 32
src/admin/config.php View File

@@ -90,38 +90,6 @@ $cache1 = DEDEDATA.'/cache/inc_catalog_base.inc';
if (!file_exists($cache1)) UpDateCatCache();
$cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc';
if (file_exists($cacheFile)) require_once($cacheFile);
//更新服务器
require_once(DEDEDATA.'/admin/config_update.php');
if (strlen($cfg_cookie_encode) <= 10) {
$chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789';
$hash = '';
$length = rand(28, 32);
$max = strlen($chars) - 1;
for ($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
$dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' ");
$configfile = DEDEDATA.'/config.cache.inc.php';
if (!is_writeable($configfile)) {
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数";
exit();
}
$fp = fopen($configfile, 'w');
flock($fp, 3);
fwrite($fp, "<"."?php\r\n");
$dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC ");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
if ($row['type'] == 'number') {
if ($row['value'] == '') $row['value'] = 0;
fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n");
} else {
fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n");
}
}
fwrite($fp, "?".">");
fclose($fp);
}
/**
* 更新栏目缓存
*


+ 0
- 2
src/admin/login.php View File

@@ -27,8 +27,6 @@ if (is_dir(dirname(__FILE__).'/../install')) {
fclose($fp);
}
}
//更新服务器
require_once(DEDEDATA.'/admin/config_update.php');
//检测后台目录是否更名
$cururl = GetCurUrl();
if (preg_match('/admin\/login/i', $cururl)) {


+ 0
- 1
src/admin/module_main.php View File

@@ -13,7 +13,6 @@ CheckPurview('sys_module');
require_once(DEDEINC."/dedemodule.class.php");
require_once(DEDEINC."/libraries/oxwindow.class.php");
if (empty($action)) $action = '';
require_once(DEDEDATA."/admin/config_update.php");
$mdir = DEDEDATA.'/module';
$mdurl = "";
function TestWriteAble($d)


+ 0
- 11
src/data/admin/config_update.php View File

@@ -1,11 +0,0 @@
<?php

/**
* @version $Id: config_update.php 1 11:36 2011-2-21 tianya $
* @package DedeBIZ.Administrator
* @copyright Copyright (c) 2022, DedeBIZ.COM
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/

//更新服务器,如果有变动,请到 https://www.dedebiz.com 查询

Loading…
Cancel
Save