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:
drigato 2014-08-16 11:05:55 -04:00
parent 1d43200041
commit 520387fcad
5 changed files with 27 additions and 7 deletions

View file

@ -256,19 +256,25 @@ class Application_Service_ShowService
*/
private function storeInstanceIds()
{
$instances = $this->ccShow->getCcShowInstancess();
$instances = $this->ccShow->getFutureCcShowInstancess();
foreach ($instances as $instance) {
$this->instanceIdsForScheduleUpdates[] = $instance->getDbId();
}
}
/**
*
* Adjusts the items in cc_schedule to reflect the
* new (if one) start and end time of the show getting updated
* @param $showData
*/
private function adjustSchedule($showData)
{
$con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
$this->updateScheduleStartEndTimes($showData);
$ccShowInstances = $this->ccShow->getCcShowInstancess();
$ccShowInstances = $this->ccShow->getFutureCcShowInstancess();
foreach ($ccShowInstances as $instance) {
$instance->updateScheduleStatus($con);
}
@ -585,10 +591,10 @@ SQL;
private function preserveLinkedShowContent()
{
/* Get show content from any linked instance. It doesn't
/* Get show content from any future linked instance. It doesn't
* matter which instance since content is the same in all.
*/
$ccShowInstance = $this->ccShow->getCcShowInstancess()->getFirst();
$ccShowInstance = $this->ccShow->getFutureCcShowInstancess()->getFirst();
if (!$ccShowInstance) {
return;