aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_extensions.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-07-13 15:44:58 +0200
committerTristan Darricau <github@nicofuma.fr>2014-07-13 18:09:34 +0200
commit519e64205a50b15efa8589901c87f5b21448993a (patch)
tree82ab03bbf7315f42857d45badd32b00a636c8c49 /phpBB/includes/acp/acp_extensions.php
parentdd78b564e56152be559b4ec476e35698fa32e1bf (diff)
downloadforums-519e64205a50b15efa8589901c87f5b21448993a.tar
forums-519e64205a50b15efa8589901c87f5b21448993a.tar.gz
forums-519e64205a50b15efa8589901c87f5b21448993a.tar.bz2
forums-519e64205a50b15efa8589901c87f5b21448993a.tar.xz
forums-519e64205a50b15efa8589901c87f5b21448993a.zip
[ticket/12847] Allow the extensions to say if they can be enabled
PHPBB3-12847
Diffstat (limited to 'phpBB/includes/acp/acp_extensions.php')
-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);