diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2011-05-12 23:48:54 +0000 |
| commit | 2ad445441974c64599df496ba4a585415aa41169 (patch) | |
| tree | 49b2860fdac2d2ff16134bfa2aa8d8a972b93301 /modules/gallery/libraries/Form_Uploadify.php | |
| parent | 1f7c1f18c651c58048e92d615c71ac0fe6691c10 (diff) | |
| parent | 9aeb824aa1d15bd94bd7cef0a322c4e8a667e67b (diff) | |
Manually merged a conflict after pulling from upstream.
Diffstat (limited to 'modules/gallery/libraries/Form_Uploadify.php')
| -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; } |
