From 97573bb4657c9ac9e07b9c2e6d7032c623d6e54e Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Thu, 31 Dec 2020 21:14:33 +0000 Subject: [PATCH] Fix loading of extensions that have hyphen in their name --- chandler/Extensions/ExtensionManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chandler/Extensions/ExtensionManager.php b/chandler/Extensions/ExtensionManager.php index 68c5a7d..1f4f5e6 100644 --- a/chandler/Extensions/ExtensionManager.php +++ b/chandler/Extensions/ExtensionManager.php @@ -67,8 +67,8 @@ class ExtensionManager include_once CHANDLER_ROOT . \"/extensions/enabled/\" . str_replace(\"\\\\\", \"/\", \$class) . \".php\"; ")); - define(mb_strtoupper($name) . "_ROOT", CHANDLER_ROOT . "/extensions/enabled/$name", false); - define(mb_strtoupper($name) . "_ROOT_CONF", chandler_parse_yaml(CHANDLER_ROOT . "/extensions/enabled/$name/$name.yml"), false); + define(str_replace("-", "_", mb_strtoupper($name)) . "_ROOT", CHANDLER_ROOT . "/extensions/enabled/$name", false); + define(str_replace("-", "_", mb_strtoupper($name)) . "_ROOT_CONF", chandler_parse_yaml(CHANDLER_ROOT . "/extensions/enabled/$name/$name.yml"), false); if(isset($configuration->init)) (require(CHANDLER_ROOT . "/extensions/enabled/$name/" . $configuration->init))();