CC-4961: Show linking

Removed logic out of edit-show action
Created new SchedulerService
Fixed overlapping show bug
This commit is contained in:
denise 2013-03-21 16:31:05 -04:00
parent a7601d290f
commit 6766d208aa
9 changed files with 189 additions and 182 deletions

View file

@ -295,7 +295,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$rebroadcastShowStart->setTimezone(new DateTimeZone('UTC'));
$rebroadcastShowEnd = clone $rebroadcastShowStart;
$rebroadcastShowEnd->add(new DateInterval($durationToAdd));
$overlapping = Application_Model_Schedule::checkOverlappingShows($rebroadcastShowStart, $rebroadcastShowEnd, $update, $instanceId);
$overlapping = Application_Model_Schedule::checkOverlappingShows($rebroadcastShowStart,
$rebroadcastShowEnd, $update, null, $formData["add_show_id"]);
if ($overlapping) {
$valid = false;
$this->getElement('add_show_duration')->setErrors(array(_('Cannot schedule overlapping shows')));