diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e11eadb6e7..1769d55f80 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-08-02 Sergio Martin + + * include/functions_filemanager.php: added new error message + on file manager to warn when the post size limit is + exceded by the uploaded file + 2013-08-02 Miguel de Dios * include/graphs/functions_gd.php, include/graphs/fgraph.php, diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 913f7a51bb..f10e3c1cf1 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -187,6 +187,12 @@ if ($upload_file) { } } +// Control the max_post_size exceed +if (intval($_SERVER['CONTENT_LENGTH']) > 0 && empty($_POST) AND empty($_FILES)) { + $config['filemanager']['correct_upload_file'] = 0; + $config['filemanager']['message'] = ui_print_error_message(__('File size seems to be too large. Please check your php.ini configuration or contact with the administrator'), '', true); +} + // Create text file $create_text_file = (bool) get_parameter ('create_text_file'); if ($create_text_file) {