Making slideshow work also on sundays.

This commit is contained in:
misund committed 2014-02-09 08:41:48 +01:00
1 parent 14b630429c
commit b90ff210ff
1 file changed
+2 -1
+2 -1
View File
@@ -28,7 +28,8 @@ class DisplayTime extends AppModel
function filterByDisplayTime($ids)
{
$timeofweek = time() - strtotime('this week midnight');
$timeofweek = time() - strtotime('this week midnight'); // Fucks up infoscreen every sunday
$timeofweek = time() - strtotime(date('o-\\WW')); // {isoYear}-W{isoWeekNumber}
$tmp = $this->find('all', array('fields'=>array('slide_id'), 'conditions'=>array('DisplayTime.slide_id'=>$ids,'DisplayTime.start <= '=>$timeofweek, 'DisplayTime.stop >= '=>$timeofweek)));