Deleting show code improvement.
This commit is contained in:
parent
ff557ec75f
commit
7d70a5ed28
|
@ -655,15 +655,16 @@ SQL;
|
||||||
->filterByDbDay($dayOfWeek)
|
->filterByDbDay($dayOfWeek)
|
||||||
->findOne();
|
->findOne();
|
||||||
|
|
||||||
$lastShowStartDT->setTimeZone(new DateTimeZone(
|
if (isset($ccShowDay)) {
|
||||||
$ccShowDay->getDbTimezone()));
|
$lastShowStartDT->setTimeZone(new DateTimeZone(
|
||||||
$lastShowEndDT = Application_Service_CalendarService::addDeltas(
|
$ccShowDay->getDbTimezone()));
|
||||||
$lastShowStartDT, 1, 0);
|
$lastShowEndDT = Application_Service_CalendarService::addDeltas(
|
||||||
|
$lastShowStartDT, 1, 0);
|
||||||
|
|
||||||
$ccShowDay
|
$ccShowDay
|
||||||
->setDbLastShow($lastShowEndDT->format("Y-m-d"))
|
->setDbLastShow($lastShowEndDT->format("Y-m-d"))
|
||||||
->save();
|
->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove the old repeating deleted instances.
|
//remove the old repeating deleted instances.
|
||||||
|
@ -872,6 +873,7 @@ SQL;
|
||||||
private function createWeeklyRepeatInstances($showDay, $populateUntil,
|
private function createWeeklyRepeatInstances($showDay, $populateUntil,
|
||||||
$repeatType, $repeatInterval, $daysAdded=null)
|
$repeatType, $repeatInterval, $daysAdded=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$show_id = $showDay->getDbShowId();
|
$show_id = $showDay->getDbShowId();
|
||||||
$first_show = $showDay->getDbFirstShow(); //non-UTC
|
$first_show = $showDay->getDbFirstShow(); //non-UTC
|
||||||
$last_show = $showDay->getDbLastShow(); //non-UTC
|
$last_show = $showDay->getDbLastShow(); //non-UTC
|
||||||
|
@ -896,7 +898,6 @@ SQL;
|
||||||
|
|
||||||
$previousDate = clone $start;
|
$previousDate = clone $start;
|
||||||
foreach ($datePeriod as $date) {
|
foreach ($datePeriod as $date) {
|
||||||
|
|
||||||
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
|
||||||
$date, $duration);
|
$date, $duration);
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue