mirror of
https://github.com/openvk/chandler.git
synced 2025-04-17 21:43:00 +03:00
Fix mystery bug
This commit is contained in:
parent
05f430b556
commit
82da99937d
1 changed files with 5 additions and 2 deletions
|
@ -70,8 +70,11 @@ class ExtensionManager
|
||||||
define(str_replace("-", "_", mb_strtoupper($name)) . "_ROOT", CHANDLER_ROOT . "/extensions/enabled/$name", 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);
|
define(str_replace("-", "_", mb_strtoupper($name)) . "_ROOT_CONF", chandler_parse_yaml(CHANDLER_ROOT . "/extensions/enabled/$name/$name.yml"), false);
|
||||||
|
|
||||||
if(isset($configuration->init))
|
if(isset($configuration->init)) {
|
||||||
(require(CHANDLER_ROOT . "/extensions/enabled/$name/" . $configuration->init))();
|
$init = require(CHANDLER_ROOT . "/extensions/enabled/$name/" . $configuration->init);
|
||||||
|
if(is_callable($init))
|
||||||
|
$init();
|
||||||
|
}
|
||||||
|
|
||||||
if(is_dir($hooks = CHANDLER_EXTENSIONS_ENABLED . "/$name/Hooks")) {
|
if(is_dir($hooks = CHANDLER_EXTENSIONS_ENABLED . "/$name/Hooks")) {
|
||||||
foreach(Finder::findFiles("*Hook.php")->in($hooks) as $hookFile) {
|
foreach(Finder::findFiles("*Hook.php")->in($hooks) as $hookFile) {
|
||||||
|
|
Loading…
Reference in a new issue