diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-03-19 15:53:08 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-03-19 15:53:08 +0100 |
commit | 9958a68c575edeed965f5b47926329e039e4096e (patch) | |
tree | dd6af1e4f857bc3e0307b392b37ea4f5900f4eb8 /phpBB/includes/acp/acp_extensions.php | |
parent | 45ae23628e758ad4e06318a2191dd33f0427fbc1 (diff) | |
parent | 59396771e6fe99a42aa48f0b8192c9c90bf60f6b (diff) | |
download | forums-9958a68c575edeed965f5b47926329e039e4096e.tar forums-9958a68c575edeed965f5b47926329e039e4096e.tar.gz forums-9958a68c575edeed965f5b47926329e039e4096e.tar.bz2 forums-9958a68c575edeed965f5b47926329e039e4096e.tar.xz forums-9958a68c575edeed965f5b47926329e039e4096e.zip |
Merge branch '3.1.x' into 3.2.x
Diffstat (limited to 'phpBB/includes/acp/acp_extensions.php')
-rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index e915fa8c75..1416a4b583 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -145,14 +145,13 @@ class acp_extensions break; case 'enable_pre': - if (!$md_manager->validate_dir()) + try { - trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + $md_manager->validate_enable(); } - - if (!$md_manager->validate_enable()) + catch (\phpbb\extension\exception $e) { - trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING); + trigger_error($e . adm_back_link($this->u_action), E_USER_WARNING); } $extension = $phpbb_extension_manager->get_extension($ext_name); @@ -176,14 +175,13 @@ class acp_extensions break; case 'enable': - if (!$md_manager->validate_dir()) + try { - trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + $md_manager->validate_enable(); } - - if (!$md_manager->validate_enable()) + catch (\phpbb\extension\exception $e) { - trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING); + trigger_error($e . adm_back_link($this->u_action), E_USER_WARNING); } $extension = $phpbb_extension_manager->get_extension($ext_name); |