mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 06:51:33 +02:00
[ticket/10631] Make failure to meet ext enable requirements clearer
Turn the blocks red on the details page if requirement is not met. Also changing a how the errors come up when trying to enable/disable an extension when they cannot be. PHPBB3-10631
This commit is contained in:
committed by
Unknown Bliss
parent
dce04b2d03
commit
7b643fe8a5
@@ -43,7 +43,7 @@ class acp_extensions
|
||||
|
||||
$action = $request->variable('action', 'list');
|
||||
$ext_name = $request->variable('ext_name', '');
|
||||
|
||||
|
||||
// Cancel action
|
||||
if ($request->is_set_post('cancel'))
|
||||
{
|
||||
@@ -79,9 +79,14 @@ class acp_extensions
|
||||
break;
|
||||
|
||||
case 'enable_pre':
|
||||
if (!$md_manager->validate_enable() || $phpbb_extension_manager->enabled($ext_name))
|
||||
if (!$md_manager->validate_enable())
|
||||
{
|
||||
trigger_error('EXTENSION_NOT_AVAILABLE');
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->enabled($ext_name))
|
||||
{
|
||||
redirect($this->u_action);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_ext_enable';
|
||||
@@ -95,7 +100,7 @@ class acp_extensions
|
||||
case 'enable':
|
||||
if (!$md_manager->validate_enable())
|
||||
{
|
||||
trigger_error('EXTENSION_NOT_AVAILABLE');
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->enable_step($ext_name))
|
||||
@@ -115,7 +120,7 @@ class acp_extensions
|
||||
case 'disable_pre':
|
||||
if (!$phpbb_extension_manager->enabled($ext_name))
|
||||
{
|
||||
trigger_error('EXTENSION_NOT_AVAILABLE');
|
||||
redirect($this->u_action);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_ext_disable';
|
||||
|
Reference in New Issue
Block a user