From 790d4085872f6be627a64b4bec24e753d29c239d Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 16 Oct 2015 14:23:23 -0700 Subject: [PATCH] Fixes #1205 - plugin folder wipe issue. --- e107_admin/plugin.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 65eb3a7e3..d770e06d6 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -788,12 +788,13 @@ class pluginManager{ e107::getLog()->add('PLUGMAN_03', $logInfo, E_LOG_INFORMATIVE, ''); } - if($_POST['delete_files']) + if(!empty($_POST['delete_files']) && ($plug['plugin_installflag'] == true)) { - include_once(e_HANDLER.'file_class.php'); - $fi = new e_file; - $result = $fi->rmtree(e_PLUGIN.$eplug_folder); - $text .= ($result ? '
'.EPL_ADLAN_86.e_PLUGIN.$eplug_folder : '
'.EPL_ADLAN_87.'
'.EPL_ADLAN_31.' '.e_PLUGIN.$eplug_folder.' '.EPL_ADLAN_32); + if(!empty($eplug_folder)) + { + $result = e107::getFile()->rmtree(e_PLUGIN.$eplug_folder); + $text .= ($result ? '
'.EPL_ADLAN_86.e_PLUGIN.$eplug_folder : '
'.EPL_ADLAN_87.'
'.EPL_ADLAN_31.' '.e_PLUGIN.$eplug_folder.' '.EPL_ADLAN_32); + } } else {