added case for non ending shows
This commit is contained in:
parent
def79d7679
commit
cc1715426f
1 changed files with 7 additions and 0 deletions
|
@ -187,6 +187,12 @@ class Show {
|
||||||
|
|
||||||
$sql = $sql_gen ." WHERE ". $sql_range;
|
$sql = $sql_gen ." WHERE ". $sql_range;
|
||||||
}
|
}
|
||||||
|
if(!is_null($start) && is_null($end)) {
|
||||||
|
$sql_range = "(last_show IS NULL)
|
||||||
|
OR (last_show > '{$start}')";
|
||||||
|
|
||||||
|
$sql = $sql_gen ." WHERE ". $sql_range;
|
||||||
|
}
|
||||||
if(!is_null($days)){
|
if(!is_null($days)){
|
||||||
|
|
||||||
$sql_opt = array();
|
$sql_opt = array();
|
||||||
|
@ -262,6 +268,7 @@ class Show {
|
||||||
$repeatDate = $CC_DBC->GetOne($diff);
|
$repeatDate = $CC_DBC->GetOne($diff);
|
||||||
$repeat_epoch = strtotime($repeatDate);
|
$repeat_epoch = strtotime($repeatDate);
|
||||||
|
|
||||||
|
//show has finite duration.
|
||||||
if (isset($show_end_epoch) && $repeat_epoch < $show_end_epoch && $repeat_epoch < $end_epoch) {
|
if (isset($show_end_epoch) && $repeat_epoch < $show_end_epoch && $repeat_epoch < $end_epoch) {
|
||||||
$shows[] = $this->makeFullCalendarEvent($row, $repeatDate);
|
$shows[] = $this->makeFullCalendarEvent($row, $repeatDate);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue