CC-4071: Prevent shows from overlapping on drag and drop in calendar
-done
This commit is contained in:
parent
ae08c54689
commit
771974433b
|
@ -913,7 +913,7 @@ class Application_Model_Schedule {
|
|||
}
|
||||
}
|
||||
|
||||
public static function checkOverlappingShows($show_start, $show_end, $update=false, $instanceId=false) {
|
||||
public static function checkOverlappingShows($show_start, $show_end, $update=false, $instanceId=null) {
|
||||
global $CC_CONFIG;
|
||||
|
||||
$overlapping = false;
|
||||
|
|
|
@ -257,6 +257,12 @@ class Application_Model_ShowInstance {
|
|||
return "Can't move show into past";
|
||||
}
|
||||
|
||||
//check if show is overlapping
|
||||
$overlapping = Application_Model_Schedule::checkOverlappingShows($newStartsDateTime, $newEndsDateTime, true, $this->getShowInstanceId());
|
||||
if ($overlapping) {
|
||||
return "Cannot schedule overlapping shows";
|
||||
}
|
||||
|
||||
if ($this->isRecorded()) {
|
||||
|
||||
//rebroadcasts should start at max 1 hour after a recorded show has ended.
|
||||
|
|
Loading…
Reference in New Issue