summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-10 22:16:30 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-10 22:16:30 +0000
commit7327a025db941554501bbbe79c057fa308fb205c (patch)
tree1efaf1039656d908481439ae9d2d7eac89694564
parentd7ab14aa674eb8381f57f8f1e0694fa50f2ba7a0 (diff)
downloadampache-7327a025db941554501bbbe79c057fa308fb205c.tar.gz
ampache-7327a025db941554501bbbe79c057fa308fb205c.tar.bz2
ampache-7327a025db941554501bbbe79c057fa308fb205c.zip
sync over the dont divide hours by 60 to get days fix
-rw-r--r--templates/show_recently_played.inc.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php
index dc32d644..eff14df9 100644
--- a/templates/show_recently_played.inc.php
+++ b/templates/show_recently_played.inc.php
@@ -41,7 +41,21 @@ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days a
while ($amount >= 1) {
$final = $amount;
$time_place++;
- $amount = floor($amount/60);
+ if ($time_place <= 2) {
+ $amount = floor($amount/60);
+ }
+ if ($time_place == '3') {
+ $amount = floor($amount/24);
+ }
+ if ($time_place == '4') {
+ $amount = floor($amount/7);
+ }
+ if ($time_place == '5') {
+ $amount = floor($amount/4);
+ }
+ if ($time_place == '6') {
+ $amount = floor ($amount/12);
+ }
}
$time_string = $final . ' ' . $time_unit[$time_place];