aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_extensions.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-08-05 19:00:20 -0500
committerUnknown Bliss <m@michaelcullum.com>2012-09-01 15:05:56 +0100
commit7b643fe8a5fd3b92bb4db9eacb27645417004709 (patch)
tree89e96aa6658d75f1ef443bb00f5990077212ff99 /phpBB/includes/acp/acp_extensions.php
parentdce04b2d03f93c9237b743afbcbd89fb6405f836 (diff)
downloadforums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.gz
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.bz2
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.tar.xz
forums-7b643fe8a5fd3b92bb4db9eacb27645417004709.zip
[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
Diffstat (limited to 'phpBB/includes/acp/acp_extensions.php')
-rw-r--r--phpBB/includes/acp/acp_extensions.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 1a9d51505a..8dde6bc36c 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -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($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action));
+ }
+
+ if ($phpbb_extension_manager->enabled($ext_name))
{
- trigger_error('EXTENSION_NOT_AVAILABLE');
+ 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';