summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
authorjhilden <jakobhilden@gmail.com>2009-06-04 21:32:45 -0400
committerjhilden <jakobhilden@gmail.com>2009-06-04 21:32:45 -0400
commit81d20c79b6c17a3c395d74da9aa995b24fd06810 (patch)
treec722b6514e4adca2a8ac6efd285a1d89bcc66c82 /modules/gallery/views
parent8933a19f1fb56378c1be68bd82c91a577fece87d (diff)
parent5158a6f4339ee85b928e6bd33a937a24f91f8bc2 (diff)
fixed another bug with the filesize unit and added a better error message
Merge branch 'master' of git@github.com:gallery/gallery3 Conflicts: modules/gallery/views/simple_uploader.html.php
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/simple_uploader.html.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php
index 873129d5..81e8c437 100644
--- a/modules/gallery/views/simple_uploader.html.php
+++ b/modules/gallery/views/simple_uploader.html.php
@@ -80,12 +80,7 @@
"user_agent": "<?= Input::instance()->server("HTTP_USER_AGENT") ?>",
"csrf": "<?= $csrf ?>"
},
- <?
- $file_size_limit = ini_get('upload_max_filesize');
- if ($file_size_limit == "") $file_size_limit = "100";
- else $file_size_limit = substr($file_size_limit, 0, strlen($file_size_limit)-1); // strip trailing "M"
- ?>
- file_size_limit : "<?= $file_size_limit ?>MB",
+ file_size_limit : "<?= ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize"))."B" : "100MB" ?>",
file_types : "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4",
file_types_description : "<?= t("Photos and Movies") ?>",
file_upload_limit : 1000,
@@ -155,11 +150,7 @@
switch (error_code) {
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
fp.title.html(file.name);
- fp.set_status("error", "<strong><?= t("File is too big.") ?></strong>
- <?= t("A likely error source is a too low value for
- <em>upload_max_filesize</em> (".ini_get('upload_max_filesize').")
- and/or <em>max_post_size</em> (".ini_get('max_post_size').")
- in you php.ini.") ?>");
+ fp.set_status("error", "<strong><?= t("File is too big.") ?></strong> <?= t("A likely error source is a too low value for") ?> <br /> <em>upload_max_filesize</em> (<?= ini_get('upload_max_filesize') ?>) <?= t("in your") ?> <em>php.ini</em>.");
break;
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
fp.title.html(file.name);