From 15a8037d33aa569814920b04cdd66bc23a133a39 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Fri, 2 Aug 2013 12:38:38 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8623 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_filemanager.php | 6 ++++++ 2 files changed, 12 insertions(+) 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) {