summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-02 12:09:34 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-02 12:09:34 -0800
commit1ab8ac305bf53bae8c05b917b06f035b9b700937 (patch)
tree9f483a5ced3cc5e8090b618d09d2b17d5e13ded4
parent714c97763ad9af0bbc5fab97144246b3137d5350 (diff)
Allow users to override the number of simulatenous uploads. This setting won't appear until after they have attempted to upload at least once and have issues.
-rw-r--r--modules/gallery/libraries/Form_Uploadify.php7
-rw-r--r--modules/gallery/views/form_uploadify.html.php2
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/gallery/libraries/Form_Uploadify.php b/modules/gallery/libraries/Form_Uploadify.php
index b1d9fa74..52fa45f0 100644
--- a/modules/gallery/libraries/Form_Uploadify.php
+++ b/modules/gallery/libraries/Form_Uploadify.php
@@ -45,6 +45,13 @@ class Form_Uploadify_Core extends Form_Input {
$v = new View("form_uploadify.html");
$v->album = $this->data["album"];
$v->script_data = $this->data["script_data"];
+ $upload_limit = module::get_var("gallery", "upload_limit");
+ if (empty($upload_limit)) {
+ $upload_limit = 5;
+ module::set_var("gallery", "upload_limit", 5);
+ }
+
+ $v->upload_limit = $upload_limit;
return $v;
}
diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php
index 5e99c8d5..c18bc8ca 100644
--- a/modules/gallery/views/form_uploadify.html.php
+++ b/modules/gallery/views/form_uploadify.html.php
@@ -24,7 +24,7 @@
fileDesc: <?= t("Photos and movies")->for_js() ?>,
cancelImg: "<?= url::file("lib/uploadify/cancel.png") ?>",
buttonText: <?= t("Select photos...")->for_js() ?>,
- simUploadLimit: 10,
+ simUploadLimit: <?= $upload_limit ?>,
wmode: "transparent",
hideButton: true, /* should be true */
auto: true,