From 58e68a6fb921d9ef2161fb0e14e21ac96ad4a88f Mon Sep 17 00:00:00 2001 From: llgoer Date: Mon, 4 Jan 2021 13:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B0=8F=E4=BA=8Ephp7.2?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dedebiz | 3 ++- src/include/autoload.inc.php | 5 +++++ src/include/autoload7.inc.php | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dedebiz b/dedebiz index c93fbc50..cd40de8f 100755 --- a/dedebiz +++ b/dedebiz @@ -156,7 +156,8 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $templet = $row['templet']; $templet = str_replace("{style}", $cfg_df_style, $templet); $pv = new PartView(); - $GLOBALS['_arclistEnv'] = 'index'; + $GLOBALS['_arclistEnv'] = 'index'; + $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); $pv->SaveToHtml($homeFile); DedeCli::write("Make index html successfull"); diff --git a/src/include/autoload.inc.php b/src/include/autoload.inc.php index 1c6e9a4c..defb4f33 100755 --- a/src/include/autoload.inc.php +++ b/src/include/autoload.inc.php @@ -11,10 +11,15 @@ if(!defined('DEDEINC')) exit("Request Error!"); function __autoload($classname) { $classname = preg_replace("/[^0-9a-z_]/i", '', $classname); + $classname = strtolower($classname); if( class_exists ( $classname ) ) { return TRUE; } + if (in_array($classname, array("archives","freelist","listview","partview","rssview", + "searchview","sglistview","sgpage","specview","taglist"))) { + $classname = "arc.".$classname; + } $libclassfile = $classname.'.class.php'; if ( is_file ( DEDEINC.'/'.$libclassfile ) ) { diff --git a/src/include/autoload7.inc.php b/src/include/autoload7.inc.php index 4088a289..14179315 100755 --- a/src/include/autoload7.inc.php +++ b/src/include/autoload7.inc.php @@ -20,7 +20,6 @@ function dede_autoloader($classname) "searchview","sglistview","sgpage","specview","taglist"))) { $classname = "arc.".$classname; } - $libclassfile = $classname.'.class.php'; if ( is_file ( DEDEINC.'/'.$libclassfile ) ) {