Deleting show code improvement.

This commit is contained in:
denise 2013-07-29 15:13:47 -04:00
parent ff557ec75f
commit 7d70a5ed28
1 changed files with 10 additions and 9 deletions
airtime_mvc/application/services

View File

@ -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);
/*