Merge pull request #6011 from fabrixxm/issues/6010

Fix move from Core\Addon to Core\Hook
This commit is contained in:
Hypolite Petovan 2018-10-23 11:43:41 -04:00 committed by GitHub
commit e6fd05d8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1774,7 +1774,7 @@ class App
$privateapps = Core\Config::get('config', 'private_addons', false); $privateapps = Core\Config::get('config', 'private_addons', false);
if (Core\Addon::isEnabled($this->module) && file_exists("addon/{$this->module}/{$this->module}.php")) { if (Core\Addon::isEnabled($this->module) && file_exists("addon/{$this->module}/{$this->module}.php")) {
//Check if module is an app and if public access to apps is allowed or not //Check if module is an app and if public access to apps is allowed or not
if ((!local_user()) && Core\Addon::isApp($this->module) && $privateapps) { if ((!local_user()) && Core\Hook::isAddonApp($this->module) && $privateapps) {
info(Core\L10n::t("You must be logged in to use addons. ")); info(Core\L10n::t("You must be logged in to use addons. "));
} else { } else {
include_once "addon/{$this->module}/{$this->module}.php"; include_once "addon/{$this->module}/{$this->module}.php";