cannot schedule anything in a show that overlaps.
This commit is contained in:
parent
74210b4c6d
commit
c0d379e306
2 changed files with 13 additions and 1 deletions
|
@ -295,6 +295,12 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$show = new ShowInstance($showInstanceId);
|
||||
$start_timestamp = $show->getShowStart();
|
||||
$end_timestamp = $show->getShowEnd();
|
||||
|
||||
//check to make sure show doesn't overlap.
|
||||
if(Show::getShows($start_timestamp, $end_timestamp, array($showInstanceId))) {
|
||||
$this->view->error = "cannot schedule an overlapping show.";
|
||||
return;
|
||||
}
|
||||
|
||||
$start = explode(" ", $start_timestamp);
|
||||
$end = explode(" ", $end_timestamp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue