diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 78ea972910..a7770ef901 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-09-25 Miguel de Dios + + * extensions/update_manager/lib/functions.php: changed the code + to show better info about the error when upload a oum with a size + biggest than the PHP limit. + + MERGED FROM THE BRANCH PANDORA_4.0 + 2013-09-25 Miguel de Dios * extensions/update_manager/lib/libupdate_manager_client.php: fixed diff --git a/pandora_console/extensions/update_manager/lib/functions.php b/pandora_console/extensions/update_manager/lib/functions.php index aeadbeeea3..e3a3c17ee6 100644 --- a/pandora_console/extensions/update_manager/lib/functions.php +++ b/pandora_console/extensions/update_manager/lib/functions.php @@ -572,7 +572,18 @@ function install_offline_enterprise_package(&$settings, $user_key) { } } else { - ui_print_error_message(__('File cannot be uploaded')); + //Check if the file is biggest than the limit in PHP + if ($_FILES["fileloaded"]["error"] === 1) { + $upload_max_filesize = ini_get('upload_max_filesize'); + + ui_print_error_message( + sprintf( + __('File is more biggest than the PHP limit (%s). Please change it in PHP configuration.'), + $upload_max_filesize)); + } + else { + ui_print_error_message(__('File cannot be uploaded')); + } } } ?>