From 8821554dda12dc6f75b7cdb5985adea184e038a0 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Tue, 16 Oct 2012 20:35:40 -0400 Subject: Mainly cosmetic cleanup of the catalog update complete message --- lib/class/catalog.class.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lib/class/catalog.class.php') 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
" . T_('Catalog Update Finished') . "... " . T_('Total Time') . " [" . date("i:s",$time_diff) . "] " . - T_('Total Songs') . " [" . $this->count . "] " . T_('Songs Per Seconds') . " [" . $song_per_sec . "]

"; + echo "\n
" . + printf(T_('Catalog Update Finished. Total Time: [%s] Total Songs: [%s] Songs Per Second: [%s]'), + date('i:s', $time_diff), $this->count, $rate); + echo '

'; show_box_bottom(); } // add_to_catalog -- cgit