mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/12847] Allow the extensions to say if they can be enabled
PHPBB3-12847
This commit is contained in:
@@ -137,6 +137,12 @@ class acp_extensions
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$extension = $phpbb_extension_manager->get_extension($ext_name);
|
||||
if (!$extension->is_enableable())
|
||||
{
|
||||
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->is_enabled($ext_name))
|
||||
{
|
||||
redirect($this->u_action);
|
||||
@@ -162,6 +168,12 @@ class acp_extensions
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$extension = $phpbb_extension_manager->get_extension($ext_name);
|
||||
if (!$extension->is_enableable())
|
||||
{
|
||||
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->is_enabled($ext_name))
|
||||
{
|
||||
redirect($this->u_action);
|
||||
|
Reference in New Issue
Block a user