diff --git a/src/dede/templets/index_body.htm b/src/dede/templets/index_body.htm
index 7539b581..7c1308bb 100755
--- a/src/dede/templets/index_body.htm
+++ b/src/dede/templets/index_body.htm
@@ -162,9 +162,7 @@
由于您的系统以安全模式运行,为了确保程序兼容性,第一次进入本系统时请更改“更改系统参数”里的FTP选项,并选择用FTP形式创建目录,完成后:点击此进行一次DedeCMS目录权限检测>>";
- } else {
- echo " DedeCMS目录权限检测>>";
+ echo "
由于您的系统以安全模式运行,为了确保程序兼容性,第一次进入本系统时请更改“更改系统参数”里的FTP选项,并选择用FTP形式创建目录";
}
?>
diff --git a/src/include/arc.archives.class.php b/src/include/arc.archives.class.php
index 57fff254..f4f84611 100755
--- a/src/include/arc.archives.class.php
+++ b/src/include/arc.archives.class.php
@@ -1066,8 +1066,14 @@ class Archives
$kaarr[] = "$key";
}
+ $GLOBALS['_dd_karr'] = $karr;
+ $GLOBALS['_dd_kaarr'] = $kaarr;
+
// 这里可能会有错误
- if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+ if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
+ $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight8", $body);
+ } else if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+
$body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body);
} else {
$body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body);
@@ -1079,11 +1085,15 @@ class Archives
}
} //End Archives
+function _highlight8($matches){
+ return _highlight($matches[2], $GLOBALS['_dd_karr'], $GLOBALS['_dd_kaarr'], $matches[1]);
+}
+
//高亮专用, 替换多次是可能不能达到最多次
function _highlight($string, $words, $result, $pre)
{
global $cfg_replace_num;
- if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+ if (version_compare(PHP_VERSION, '5.5.0', '>=') && version_compare(PHP_VERSION, '8.0.0', '<')) {
$string = $string[0];
$pre = $pre[0];
}
diff --git a/src/include/inc/inc_fun_funAdmin.php b/src/include/inc/inc_fun_funAdmin.php
index 1942e6c2..f056aa99 100755
--- a/src/include/inc/inc_fun_funAdmin.php
+++ b/src/include/inc/inc_fun_funAdmin.php
@@ -21,6 +21,9 @@
function SpGetPinyin($str, $ishead = 0, $isclose = 1)
{
global $pinyins;
+ if ($pinyins==null) {
+ $pinyins = array();
+ }
global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port;
global $cfg_soft_lang;
$restr = '';