aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-08-07 13:00:08 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-08-07 13:00:08 +0200
commitf474e33a430176fd7ef809141b258eec77993e03 (patch)
tree461209e195862e42360c4d60a45d8c7c55c16d96 /phpBB/includes
parent2f44a865a01d1c9d1198484c7a9e841c22ef267d (diff)
parent519e64205a50b15efa8589901c87f5b21448993a (diff)
downloadforums-f474e33a430176fd7ef809141b258eec77993e03.tar
forums-f474e33a430176fd7ef809141b258eec77993e03.tar.gz
forums-f474e33a430176fd7ef809141b258eec77993e03.tar.bz2
forums-f474e33a430176fd7ef809141b258eec77993e03.tar.xz
forums-f474e33a430176fd7ef809141b258eec77993e03.zip
Merge pull request #2729 from Nicofuma/ticket/12847
[ticket/12847] Allow the extensions to say if they can be enabled * Nicofuma/ticket/12847: [ticket/12847] Allow the extensions to say if they can be enabled
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_extensions.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index aba9caaece..9bdd8eb458 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -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);