summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/uploader.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers/uploader.php')
-rw-r--r--modules/gallery/controllers/uploader.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php
index 87520032..fb496f60 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");
@@ -101,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();