From 4f80c2b602948e2aebf3c87e7960e622ac3fa15f Mon Sep 17 00:00:00 2001 From: tianya Date: Sun, 21 May 2023 12:03:13 +0800 Subject: [PATCH] =?UTF-8?q?php7.0=E5=85=BC=E5=AE=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/api.php | 7 +++++++ src/admin/index_body.php | 8 ++++---- src/install/index.php | 2 +- src/system/common.func.php | 1 + src/system/common.inc.php | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/admin/api.php b/src/admin/api.php index 8ca90381..7004af7f 100644 --- a/src/admin/api.php +++ b/src/admin/api.php @@ -115,6 +115,13 @@ if ($action === 'is_need_check_code') { $row2 = $dsql->GetOne($query); if ($row2) $add_query .= "&acount={$row2['dd']}"; $offUrl = DEDEBIZURL."/version?version={$cfg_version_detail}&formurl={$nurl}&phpver={$phpv}&os={$sp_os}&mysqlver={$mysql_ver}{$add_query}&json=1"; + if (strpos($_SERVER['SERVER_SOFTWARE'], 'Development Server') !== false && version_compare(phpversion(), '7.2', '<')) { + echo json_encode(array( + "code"=>-1, + "msg"=>'获取版本信息失败', + )); + exit; + } $dhd = new DedeHttpDown(); $dhd->OpenUrl($offUrl); $data = $dhd->GetHtml(); diff --git a/src/admin/index_body.php b/src/admin/index_body.php index 918b54ca..553ba548 100644 --- a/src/admin/index_body.php +++ b/src/admin/index_body.php @@ -8,11 +8,11 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require(dirname(__FILE__).'/config.php'); -require(DEDEINC.'/image.func.php'); -require(DEDEINC.'/dedetag.class.php'); +require_once(dirname(__FILE__).'/config.php'); +require_once(DEDEINC.'/image.func.php'); +require_once(DEDEINC.'/dedetag.class.php'); if (empty($dopost)) { - require(DEDEINC.'/inc/inc_fun_funAdmin.php'); + require_once(DEDEINC.'/inc/inc_fun_funAdmin.php'); $verLockFile = DEDEDATA.'/admin/ver.txt'; $fp = fopen($verLockFile, 'r'); $upTime = trim(fread($fp, 64)); diff --git a/src/install/index.php b/src/install/index.php index fe5b698e..8886c39b 100644 --- a/src/install/index.php +++ b/src/install/index.php @@ -11,7 +11,7 @@ error_reporting(E_ALL || ~E_NOTICE); define('INSLOCKFILE', dirname(__FILE__).'/install_lock.txt'); $verMsg = 'V6'; $dfDbname = 'DedeBIZ'; -$cfg_version_detail = '6.2.7'; //详细版本号 +$cfg_version_detail = '6.2.8beta'; //详细版本号 $errmsg = ''; if (version_compare(PHP_VERSION, '8.0.0', '>=') && function_exists("mysqli_report")) { mysqli_report(MYSQLI_REPORT_OFF); diff --git a/src/system/common.func.php b/src/system/common.func.php index 15bcddd2..f99c17f3 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -527,6 +527,7 @@ function GetUpdateSQL() } /*会员中心调用默认主题模板*/ if (!function_exists('pasterTempletDiy')) { + require_once DEDEINC."/archive/partview.class.php"; function pasterTempletDiy($path) { global $cfg_basedir, $cfg_templets_dir, $cfg_df_style; diff --git a/src/system/common.inc.php b/src/system/common.inc.php index 71ee3b4c..fba60454 100755 --- a/src/system/common.inc.php +++ b/src/system/common.inc.php @@ -189,7 +189,7 @@ $cfg_soft_dir = $cfg_medias_dir.'/soft'; $cfg_other_medias = $cfg_medias_dir.'/media'; //软件摘要信息,请不要删除,否则系统无法正确接收系统漏洞或升级信息 $cfg_version = 'V6'; -$cfg_version_detail = '6.2.7';//详细版本号 +$cfg_version_detail = '6.2.8beta';//详细版本号 $cfg_soft_lang = 'utf-8'; $cfg_soft_public = 'base'; $cfg_softname = '得德系统';