CC-5593: Overlapping Show Bug

Need to check if the show instance has been deleted
This commit is contained in:
drigato 2013-12-03 14:39:53 -05:00
parent 3b539b7c04
commit d49131db48
1 changed files with 9 additions and 0 deletions

View File

@ -1281,6 +1281,15 @@ SQL;
public static function checkOverlappingShows($show_start, $show_end,
$update=false, $instanceId=null, $showId=null)
{
//if the show instance does not exist or was deleted, return false
$ccShowInstance = CcShowInstancesQuery::create()
->filterByDbShowId($showId)
->filterByDbStarts($show_start->format("Y-m-d H:i:s"))
->findOne();
if (!$ccShowInstance || $ccShowInstance->getDbModifiedInstance() == true) {
return false;
}
$overlapping = false;
$params = array(