From ec9e7be5d82d44f0cce8962f7fafee3a4a29954e Mon Sep 17 00:00:00 2001 From: Hide_D Date: Fri, 17 May 2024 17:32:39 +0000 Subject: [PATCH] install_db --- hwe/j_install_db.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hwe/j_install_db.php b/hwe/j_install_db.php index c6eb110e..44f18e79 100644 --- a/hwe/j_install_db.php +++ b/hwe/j_install_db.php @@ -87,6 +87,20 @@ if($result !== true){ } if (!class_exists('\\sammo\\DB')) { + $loader = require __DIR__.'/../vendor/autoload.php'; + $loader->addClassMap((function () { + $d_settingMap = []; + foreach (glob(__DIR__.'/d_setting/*.orig.php') as $filepath) { + $filepath = str_replace('.orig.php', '.php', $filepath); + if(!file_exists($filepath)) { + continue; + } + $filename = basename($filepath); + $classname = explode('.', $filename)[0]; + $d_settingMap['sammo\\'.$classname] = $filepath; + }; + return $d_settingMap; + })()); opcache_reset(); }