CC-5593: Overlapping Show Bug
Get instance depending on whether instance id is provided or not
This commit is contained in:
parent
d49131db48
commit
c18d53f403
|
@ -1282,10 +1282,16 @@ SQL;
|
||||||
$update=false, $instanceId=null, $showId=null)
|
$update=false, $instanceId=null, $showId=null)
|
||||||
{
|
{
|
||||||
//if the show instance does not exist or was deleted, return false
|
//if the show instance does not exist or was deleted, return false
|
||||||
$ccShowInstance = CcShowInstancesQuery::create()
|
if (!is_null($showId)) {
|
||||||
->filterByDbShowId($showId)
|
$ccShowInstance = CcShowInstancesQuery::create()
|
||||||
->filterByDbStarts($show_start->format("Y-m-d H:i:s"))
|
->filterByDbShowId($showId)
|
||||||
->findOne();
|
->filterByDbStarts($show_start->format("Y-m-d H:i:s"))
|
||||||
|
->findOne();
|
||||||
|
} elseif (!is_null($instanceId)) {
|
||||||
|
$ccShowInstance = CcShowInstancesQuery::create()
|
||||||
|
->filterByDbId($instanceId)
|
||||||
|
->findOne();
|
||||||
|
}
|
||||||
if (!$ccShowInstance || $ccShowInstance->getDbModifiedInstance() == true) {
|
if (!$ccShowInstance || $ccShowInstance->getDbModifiedInstance() == true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue