From c6ca77377f2c55316923c62e80b34802a45979c2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 7 Aug 2010 18:02:39 -0700 Subject: Whitespace fix. --- modules/gallery/controllers/uploader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gallery/controllers/uploader.php') diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index 87520032..85d344d6 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -50,7 +50,8 @@ class Uploader_Controller extends Controller { // Uploadify adds its own field to the form, so validate that separately. $file_validation = new Validation($_FILES); $file_validation->add_rules( - "Filedata", "upload::valid", "upload::required", "upload::type[gif,jpg,jpeg,png,flv,mp4,m4v]"); + "Filedata", "upload::valid", "upload::required", + "upload::type[gif,jpg,jpeg,png,flv,mp4,m4v]"); if ($form->validate() && $file_validation->validate()) { $temp_filename = upload::save("Filedata"); -- cgit v1.2.3 From db769b76ab7b7ed54579225fca836defc7afbd11 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 31 Aug 2010 00:03:46 -0700 Subject: Expire completed uploads and introduce a text message that says how many photos have been uploaded successfully. This is to pave the way for retry code later on. --- modules/gallery/controllers/uploader.php | 8 ++++++ modules/gallery/css/gallery.css | 4 +++ modules/gallery/views/form_uploadify.html.php | 32 +++++++++++++++++----- .../gallery/views/form_uploadify_buttons.html.php | 1 + 4 files changed, 38 insertions(+), 7 deletions(-) (limited to 'modules/gallery/controllers/uploader.php') diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index 85d344d6..fb496f60 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -102,6 +102,14 @@ class Uploader_Controller extends Controller { } } + public function status($success_count, $error_count) { + // The "errors" won't be properly pluralized :-/ + print t2("Uploaded %count photo (%error errors)", + "Uploaded %count photos (%error errors)", + $success_count, + array("error" => $error_count)); + } + public function finish() { access::verify_csrf(); diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css index fb72bd48..8012c6cc 100644 --- a/modules/gallery/css/gallery.css +++ b/modules/gallery/css/gallery.css @@ -78,6 +78,10 @@ margin-bottom: 0 } +#g-add-photos-status-message { + float: right; +} + /* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-edit-permissions-form { diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 2ed7912f..36f5f284 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -3,7 +3,24 @@