summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2012-10-16 20:35:40 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2012-10-16 20:35:40 -0400
commit8821554dda12dc6f75b7cdb5985adea184e038a0 (patch)
tree95546cf7606e41e820a8761c18c34cafeced0cef /lib/class
parentbc90c0128c804252ff60c910658c5bc8218aef2b (diff)
downloadampache-8821554dda12dc6f75b7cdb5985adea184e038a0.tar.gz
ampache-8821554dda12dc6f75b7cdb5985adea184e038a0.tar.bz2
ampache-8821554dda12dc6f75b7cdb5985adea184e038a0.zip
Mainly cosmetic cleanup of the catalog update complete message
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/catalog.class.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 1d33da76..4dc46c53 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1266,20 +1266,14 @@ class Catalog extends database_object {
/* Update the Catalog last_update */
$this->update_last_add();
- $time_diff = $current_time - $start_time;
- if ($time_diff) {
- $song_per_sec = intval($this->count/$time_diff);
- }
- if (!$song_per_sec) {
- $song_per_sec = "N/A";
- }
- if (!$this->count) {
- $this->count = 0;
- }
+ $time_diff = ($current_time - $start_time) ?: 0;
+ $rate = intval($this->count / $time_diff) ?: T_('N/A');
show_box_top();
- echo "\n<br />" . T_('Catalog Update Finished') . "... " . T_('Total Time') . " [" . date("i:s",$time_diff) . "] " .
- T_('Total Songs') . " [" . $this->count . "] " . T_('Songs Per Seconds') . " [" . $song_per_sec . "]<br /><br />";
+ echo "\n<br />" .
+ printf(T_('Catalog Update Finished. Total Time: [%s] Total Songs: [%s] Songs Per Second: [%s]'),
+ date('i:s', $time_diff), $this->count, $rate);
+ echo '<br /><br />';
show_box_bottom();
} // add_to_catalog