cannot schedule anything in a show that overlaps.

This commit is contained in:
naomiaro 2011-02-06 23:58:58 -05:00
parent 74210b4c6d
commit c0d379e306
2 changed files with 13 additions and 1 deletions

View file

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