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