Skip to content

Commit

Permalink
Don't show the "(## errors)" part of the status message if there have…
Browse files Browse the repository at this point in the history
…n't been any errors.
  • Loading branch information
bharat committed Sep 2, 2010
1 parent 2a86446 commit 511826a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions modules/gallery/controllers/uploader.php
Expand Up @@ -103,11 +103,14 @@ public function add_photo($id) {
}

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() {
Expand Down

0 comments on commit 511826a

Please sign in to comment.