mirror of
https://github.com/openvk/chandler.git
synced 2024-11-14 19:19:11 +03:00
Fix regressions if allEnabled is set
This commit is contained in:
parent
d0123f79db
commit
6ca0e6a0b6
1 changed files with 4 additions and 2 deletions
|
@ -74,8 +74,8 @@ class ExtensionManager
|
|||
include_once CHANDLER_EXTENSIONS_ENABLED . \"/\" . str_replace(\"\\\\\", \"/\", \$class) . \".php\";
|
||||
"));
|
||||
|
||||
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", CHANDLER_EXTENSIONS_ENABLED . "/$name", false);
|
||||
define(str_replace("-", "_", mb_strtoupper($name)) . "_ROOT_CONF", chandler_parse_yaml(CHANDLER_EXTENSIONS_ENABLED . "/$name/$name.yml"), false);
|
||||
|
||||
if(isset($configuration->init)) {
|
||||
$init = require(CHANDLER_EXTENSIONS_ENABLED . "/$name/" . $configuration->init);
|
||||
|
@ -118,6 +118,8 @@ class ExtensionManager
|
|||
|
||||
function enableExtension(string $name): void
|
||||
{
|
||||
if(CHANDLER_ROOT_CONF["extensions"]["allEnabled"]) return;
|
||||
|
||||
if(array_key_exists($name, $this->getExtensions(true))) return;
|
||||
|
||||
$path = CHANDLER_EXTENSIONS_AVAILABLE . "/$name";
|
||||
|
|
Loading…
Reference in a new issue