CC-5904: New linked show instances may get an old copy of the schedule

This commit is contained in:
drigato 2014-08-18 18:10:45 -04:00
parent 62f8a65573
commit b9ecd00d33
2 changed files with 59 additions and 29 deletions

View file

@ -288,7 +288,26 @@ class CcShow extends BaseCcShow {
}
return $instanceIds;
}
/*
* Returns all show instances ordered by 'starts' column in desc order.
*/
public function getInstanceIdsSortedByMostRecentStartTime()
{
$instances = CcShowInstancesQuery::create()
->filterByCcShow($this)
->filterByDbModifiedInstance(false)
->orderByDbStarts(Criteria::DESC)
->find();
$instanceIdsDescOrder = array();
foreach ($instances as $instance) {
$instanceIdsDescOrder[] = $instance->getDbId();
}
return $instanceIdsDescOrder;
}
//what is this??
public function getOtherInstances($instanceId)
{
return CcShowInstancesQuery::create()