CC-5677: Library -> Scheduled column gets updated on incorrect file

This commit is contained in:
drigato 2014-01-30 12:38:18 -05:00
parent ce7eddf563
commit 883e8885c7
1 changed files with 5 additions and 5 deletions

View File

@ -761,10 +761,14 @@ class Application_Model_Scheduler
$file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']);
$file['fadeout'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadeout']);
//array that stores the cc_file ids so we can update the is_scheduled flag
$fileIds = array();
switch ($file["type"]) {
case 0:
$fileId = $file["id"];
$streamId = "null";
$fileIds[] = $fileId;
break;
case 1:
$streamId = $file["id"];
@ -832,11 +836,7 @@ class Application_Model_Scheduler
}
};
}
// update is_scheduled flag for each cc_file
$fileIds = array();
foreach ($filesToInsert as &$file) {
$fileIds[] = $file["id"];
}
$selectCriteria = new Criteria();
$selectCriteria->add(CcFilesPeer::ID, $fileIds, Criteria::IN);
$selectCriteria->addAnd(CcFilesPeer::IS_SCHEDULED, false);