Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
James 2011-08-19 16:35:54 -04:00
commit 56a21a524e
2 changed files with 61 additions and 53 deletions

View File

@ -23,10 +23,14 @@ class Application_Model_Dashboard
}
} else {
if (count($row) == 0){
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){
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.