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;
|
||||
|
|
|
@ -256,6 +256,12 @@ class Application_Model_ShowInstance {
|
|||
if ($today_timestamp > $newStartsDateTime->getTimestamp()) {
|
||||
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()) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue