From 7859783ccbe4c4a141ce0d318483a7ac3190ebf5 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 19 Aug 2011 15:45:07 -0400 Subject: [PATCH] CC-2703: orange progress bar is playing when there is not content -fix it so that previous and future shows are ignored as well. --- airtime_mvc/application/models/Dashboard.php | 24 +++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/models/Dashboard.php b/airtime_mvc/application/models/Dashboard.php index 593e60af1..dfdc97acd 100644 --- a/airtime_mvc/application/models/Dashboard.php +++ b/airtime_mvc/application/models/Dashboard.php @@ -23,10 +23,14 @@ class Application_Model_Dashboard } } else { if (count($row) == 0){ - //last item is a show instance - return array("name"=>$showInstance->getName(), - "starts"=>$showInstance->getShowStart(), - "ends"=>$showInstance->getShowEnd()); + if ($showInstance->isRecorded()){ + //last item is a show instance + return array("name"=>$showInstance->getName(), + "starts"=>$showInstance->getShowStart(), + "ends"=>$showInstance->getShowEnd()); + } else { + return null; + } } else { //return the one that started later. if ($row[0]["starts"] >= $showInstance->getShowStart()){ @@ -107,10 +111,14 @@ class Application_Model_Dashboard } } else { if (count($row) == 0){ - //last item is a show instance - return array("name"=>$showInstance->getName(), - "starts"=>$showInstance->getShowStart(), - "ends"=>$showInstance->getShowEnd()); + if ($showInstance->isRecorded()){ + //last item is a show instance + return array("name"=>$showInstance->getName(), + "starts"=>$showInstance->getShowStart(), + "ends"=>$showInstance->getShowEnd()); + } else { + return null; + } } else { //return the one that starts sooner.