diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-09-02 01:10:15 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-09-02 01:10:15 -0700 |
commit | 511826a33cbbf03bf1e3cb151f1a181b8e6723e8 (patch) | |
tree | 720922e3a54f7513a042da361d67e10e500bac0d /modules/gallery/controllers/uploader.php | |
parent | 2a86446249c4782287e1e6e472f422b851c2fb47 (diff) |
Don't show the "(## errors)" part of the status message if there haven't been any errors.
Diffstat (limited to 'modules/gallery/controllers/uploader.php')
-rw-r--r-- | modules/gallery/controllers/uploader.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index fb496f60..168e8b2d 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -103,11 +103,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)); + if ($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)); + } else { + print t2("Uploaded %count photo", "Uploaded %count photos", $success_count);} } public function finish() { |