diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index bd34ad1fe..8e9ba154f 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -343,7 +343,6 @@ class pluginManager{ else { /* e_PLUGIN is writable - continue */ - $pref['upload_storagetype'] = "1"; require_once(e_HANDLER."upload_handler.php"); $fileName = $file_userfile['name'][0]; $fileSize = $file_userfile['size'][0]; @@ -367,12 +366,7 @@ class pluginManager{ if ($fileSize) { - - $opref = $pref['upload_storagetype']; - $pref['upload_storagetype'] = 1; /* temporarily set upload type pref to flatfile */ $uploaded = file_upload(e_PLUGIN); - $pref['upload_storagetype'] = $opref; - $archiveName = $uploaded[0]['name']; /* attempt to unarchive ... */ @@ -407,7 +401,7 @@ class pluginManager{ /* ok it looks like the unarc succeeded - continue */ - /* get folder name ... */ + /* get folder name ... */ $folderName = substr($fileList[0]['stored_filename'], 0, (strpos($fileList[0]['stored_filename'], "/"))); if(file_exists(e_PLUGIN.$folderName."/plugin.php") || file_exists(e_PLUGIN.$folderName."/plugin.xml")) @@ -415,11 +409,16 @@ class pluginManager{ /* upload is a plugin */ e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_43); } - else + elseif(file_exists(e_PLUGIN.$folderName."/theme.php") || file_exists(e_PLUGIN.$folderName."/theme.xml")) { /* upload is a menu */ e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_45); } + else + { + /* upload is unlocatable */ + e107::getRender()->tablerender(EPL_ADLAN_40, 'Unknown file: '.$fileList[0]['stored_filename']); + } /* attempt to delete uploaded archive */ @unlink(e_PLUGIN.$archiveName); @@ -648,7 +647,6 @@ class pluginManager{ - diff --git a/e107_languages/English/admin/lan_plugin.php b/e107_languages/English/admin/lan_plugin.php index 935b7c900..573da1a18 100644 --- a/e107_languages/English/admin/lan_plugin.php +++ b/e107_languages/English/admin/lan_plugin.php @@ -54,7 +54,7 @@ define("EPL_ADLAN_39", "The file could not be uploaded as the ".e_PLUGIN." folde define("EPL_ADLAN_40", "Admin Message"); define("EPL_ADLAN_41", "That file does not appear to be a valid .zip or .tar archive."); define("EPL_ADLAN_42", "An error has occurred, unable to un-archive the file"); -define("EPL_ADLAN_43", "Your plugin has been uploaded and unzipped, please scroll down to see your plugin in the list."); +define("EPL_ADLAN_43", "Your plugin has been uploaded and unzipped; to install go to the uninstalled plugins page."); define("EPL_ADLAN_44", "Auto plugin upload and extraction is disabled as upload to your plugins folder is not allowed at present - if you want to be able to do this, please change the permissions on your ".e_PLUGIN." folder to allow uploads."); define("EPL_ADLAN_45", "Your menu item has been uploaded and unzipped, to activate go to your menus page."); define("EPL_ADLAN_46", "PCLZIP extract error:");