mirror of
https://github.com/friendica/friendica
synced 2025-02-19 06:46:47 +00:00
Rename method names in AddonHelper
This commit is contained in:
parent
bc6145c684
commit
04df082d4e
5 changed files with 11 additions and 11 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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,
|
||||
]);
|
||||
|
|
Loading…
Add table
Reference in a new issue