diff options
| author | Chad Kieffer <ckieffer@gmail.com> | 2011-04-23 15:02:29 -0400 |
|---|---|---|
| committer | Chad Kieffer <ckieffer@gmail.com> | 2011-04-23 15:02:29 -0400 |
| commit | 268f9425d918d14e1839b3e22203a8869093f3f0 (patch) | |
| tree | 3a0676e1fa0b158262e9ae8f0faef0474998b061 /modules/gallery/libraries | |
| parent | 07f654c8d9918608c8229404585874ce5aba7ab2 (diff) | |
| parent | a9eb995dd2b64667c300c6193656b6cdfeb4e2a5 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/Form_Uploadify.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/gallery/libraries/Form_Uploadify.php b/modules/gallery/libraries/Form_Uploadify.php index 27ab9684..3e35e380 100644 --- a/modules/gallery/libraries/Form_Uploadify.php +++ b/modules/gallery/libraries/Form_Uploadify.php @@ -48,6 +48,20 @@ class Form_Uploadify_Core extends Form_Input { $v->simultaneous_upload_limit = module::get_var("gallery", "simultaneous_upload_limit"); $v->movies_allowed = (bool) movie::find_ffmpeg(); $v->suhosin_session_encrypt = (bool) ini_get("suhosin.session.encrypt"); + + list ($toolkit_max_filesize_bytes, $toolkit_max_filesize) = graphics::max_filesize(); + + $upload_max_filesize = trim(ini_get("upload_max_filesize")); + $upload_max_filesize_bytes = num::convert_to_bytes($upload_max_filesize); + + if ($upload_max_filesize_bytes < $toolkit_max_filesize_bytes) { + $v->size_limit_bytes = $upload_max_filesize_bytes; + $v->size_limit = $upload_max_filesize; + } else { + $v->size_limit_bytes = $toolkit_max_filesize_bytes; + $v->size_limit = $toolkit_max_filesize; + } + return $v; } |
