CC-5082: Repeating shows "disappear" when switching calendar to next month

This was caused by the calendar trying to re-create single instance shows.
We needed to exclude non-repeating shows when populating the calendar with repeat events
This commit is contained in:
denise 2013-05-01 15:20:55 -04:00
parent 3d61a18261
commit 09754b20cc
1 changed files with 3 additions and 7 deletions

View File

@ -230,6 +230,7 @@ class Application_Service_ShowService
$c = new Criteria();
$c->add(CcShowDaysPeer::FIRST_SHOW, $endTimeString, Criteria::LESS_THAN);
$c->addAnd(CcShowDaysPeer::LAST_SHOW, $startTimeString, Criteria::GREATER_THAN);
$c->addAnd(CcShowDaysPeer::REPEAT_TYPE, -1, Criteria::NOT_EQUAL);
$c->addOr(CcShowDaysPeer::LAST_SHOW, null, Criteria::ISNULL);
return CcShowDaysPeer::doSelect($c);
@ -778,12 +779,6 @@ SQL;
*/
private function createNonRepeatingInstance($showDay, $populateUntil)
{
if (isset($this->ccShow)) {
$showId = $this->ccShow->getDbId();
} else {
$showId = $showDay->getDbShowId();
}
//DateTime object
$start = $showDay->getLocalStartDateAndTime();
@ -795,7 +790,8 @@ SQL;
if ($this->isUpdate) {
$ccShowInstance = $this->getInstance($utcStartDateTime);
}
$ccShowInstance->setDbShowId($showId);
$ccShowInstance->setDbShowId($this->ccShow->getDbId());
$ccShowInstance->setDbStarts($utcStartDateTime);
$ccShowInstance->setDbEnds($utcEndDateTime);
$ccShowInstance->setDbRecord($showDay->getDbRecord());