CC-3542 : When you delete the current show it takes all songs from that show out of the playout history

This commit is contained in:
Naomi Aro 2012-04-02 15:31:02 +02:00
parent eeb7273909
commit c5b761bff3
1 changed files with 18 additions and 15 deletions

View File

@ -553,6 +553,8 @@ class Application_Model_Scheduler {
$instance = CcShowInstancesQuery::create()->findPK($p_id);
if (!$instance->getDbRecord()) {
$items = CcScheduleQuery::create()
->filterByDbInstanceId($p_id)
->filterByDbEnds($this->nowDT, Criteria::GREATER_THAN)
@ -568,6 +570,7 @@ class Application_Model_Scheduler {
}
$this->removeItems($remove, false);
}
$instance->setDbEnds($this->nowDT);
$instance->save($this->con);