diff --git a/src/App/Router.php b/src/App/Router.php index da5acb18ac..c5abd56c5c 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -294,7 +294,7 @@ class Router } catch (NotFoundException $e) { $moduleName = $this->args->getModuleName(); // Then we try addon-provided modules that we wrap in the LegacyModule class - if ($this->addonHelper->isEnabled($moduleName) && file_exists("addon/{$moduleName}/{$moduleName}.php")) { + if ($this->addonHelper->isAddonEnabled($moduleName) && file_exists("addon/{$moduleName}/{$moduleName}.php")) { //Check if module is an app and if public access to apps is allowed or not $privateapps = $this->config->get('config', 'private_addons', false); if (!$this->isLocalUser && Hook::isAddonApp($moduleName) && $privateapps) { diff --git a/src/Core/Addon/AddonHelper.php b/src/Core/Addon/AddonHelper.php index 6088886ee6..76d8eff75f 100644 --- a/src/Core/Addon/AddonHelper.php +++ b/src/Core/Addon/AddonHelper.php @@ -17,19 +17,19 @@ interface AddonHelper /** * Checks if the provided addon is enabled */ - public function isEnabled(string $addonId): bool; + public function isAddonEnabled(string $addonId): bool; /** * Returns a list with the IDs of the enabled addons * * @return string[] */ - public function getEnabledList(): array; + public function getEnabledAddons(): array; /** - * Returns the list of the IDs of the non-hidden enabled addons + * Returns a list with the IDs of the non-hidden enabled addons * * @return string[] */ - public static function getVisibleList(): array; + public static function getVisibleEnabledAddons(): array; } diff --git a/src/Core/Addon/AddonProxy.php b/src/Core/Addon/AddonProxy.php index 2e260a40b4..d53b136060 100644 --- a/src/Core/Addon/AddonProxy.php +++ b/src/Core/Addon/AddonProxy.php @@ -21,7 +21,7 @@ final class AddonProxy implements AddonHelper /** * Checks if the provided addon is enabled */ - public function isEnabled(string $addonId): bool + public function isAddonEnabled(string $addonId): bool { return Addon::isEnabled($addonId); } @@ -31,17 +31,17 @@ final class AddonProxy implements AddonHelper * * @return string[] */ - public function getEnabledList(): array + public function getEnabledAddons(): array { return Addon::getEnabledList(); } /** - * Returns the list of the IDs of the non-hidden enabled addons + * Returns a list with the IDs of the non-hidden enabled addons * * @return string[] */ - public static function getVisibleList(): array + public static function getVisibleEnabledAddons(): array { return Addon::getVisibleList(); } diff --git a/src/Module/Admin/Addons/Index.php b/src/Module/Admin/Addons/Index.php index 5941d76ff6..8f3e82efb1 100644 --- a/src/Module/Admin/Addons/Index.php +++ b/src/Module/Admin/Addons/Index.php @@ -38,7 +38,7 @@ class Index extends BaseAdmin $addonHelper = DI::addonHelper(); $addon = $_GET['addon'] ?? ''; - if ($addonHelper->isEnabled($addon)) { + if ($addonHelper->isAddonEnabled($addon)) { Addon::uninstall($addon); DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s disabled.', $addon)); } elseif (Addon::install($addon)) { diff --git a/src/Module/Admin/Summary.php b/src/Module/Admin/Summary.php index 9b09843d96..72ce10e418 100644 --- a/src/Module/Admin/Summary.php +++ b/src/Module/Admin/Summary.php @@ -186,7 +186,7 @@ class Summary extends BaseAdmin '$platform' => App::PLATFORM, '$codename' => App::CODENAME, '$build' => DI::config()->get('system', 'build'), - '$addons' => [DI::l10n()->t('Active addons'), DI::addonHelper()->getEnabledList()], + '$addons' => [DI::l10n()->t('Active addons'), DI::addonHelper()->getEnabledAddons()], '$serversettings' => $server_settings, '$warningtext' => $warningtext, ]);