CC-5898: Future repeating shows may not get generated and/or filled with content
Create and fill show instances when pypo requests the schedule Changed getCcShowInstancess function to return all instances Changed some function calls to retrieve only show instances scheduled in the future
This commit is contained in:
parent
1d43200041
commit
520387fcad
5 changed files with 27 additions and 7 deletions
|
@ -967,6 +967,21 @@ SQL;
|
|||
|
||||
public static function getSchedule($p_fromDateTime = null, $p_toDateTime = null)
|
||||
{
|
||||
//generate repeating shows if we are fetching the schedule
|
||||
//for days beyond the shows_populated_until value in cc_pref
|
||||
$needScheduleUntil = $p_toDateTime;
|
||||
if (is_null($needScheduleUntil)) {
|
||||
$needScheduleUntil = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$needScheduleUntil->add(new DateInterval("P1D"));
|
||||
}
|
||||
$showsPopUntil = Application_Model_Preference::GetShowsPopulatedUntil();
|
||||
//if application is requesting shows past our previous populated until date, generate shows up until this point.
|
||||
if (is_null($showsPopUntil) || $showsPopUntil->getTimestamp() < $needScheduleUntil->getTimestamp()) {
|
||||
$service_show = new Application_Service_ShowService();
|
||||
$ccShow = $service_show->delegateInstanceCreation(null, $needScheduleUntil, true);
|
||||
Application_Model_Preference::SetShowsPopulatedUntil($needScheduleUntil);
|
||||
}
|
||||
|
||||
list($range_start, $range_end) = self::getRangeStartAndEnd($p_fromDateTime, $p_toDateTime);
|
||||
|
||||
$data = array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue