From 16e96e1c53f0018aed071930331d2dc44d8f2c9d Mon Sep 17 00:00:00 2001 From: "Aleksander Machniak (Kolab Systems)" Date: Tue, 16 Aug 2011 14:18:43 +0200 Subject: [PATCH] Use new rcube_upload_init() with client-side filesize check --- plugins/calendar/lib/calendar_ui.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php index 1e266e56..b1e6ea2a 100644 --- a/plugins/calendar/lib/calendar_ui.php +++ b/plugins/calendar/lib/calendar_ui.php @@ -479,18 +479,8 @@ class calendar_ui if (!$attrib['id']) $attrib['id'] = 'rcmUploadForm'; - // Enable upload progress bar - rcube_upload_progress_init(); - - // find max filesize value - $max_filesize = parse_bytes(ini_get('upload_max_filesize')); - $max_postsize = parse_bytes(ini_get('post_max_size')); - if ($max_postsize && $max_postsize < $max_filesize) - $max_filesize = $max_postsize; - - $this->rc->output->set_env('max_filesize', $max_filesize); - - $max_filesize = show_bytes($max_filesize); + // Get max filesize, enable upload progress bar + $max_filesize = rcube_upload_init(); $button = new html_inputfield(array('type' => 'button')); $input = new html_inputfield(array(