From cd592827fd7377d5af9d5aa27c80dc99707072c3 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 24 Feb 2014 17:46:16 -0500 Subject: [PATCH] CC-5698: Library -> Scheduled column doesn't get updated when bulk adding items Array storing file ids of scheduled files was in wrong place and was getting re-created everytime a file was inserted into a show --- airtime_mvc/application/models/Scheduler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index d57ef0090..4af3efd5c 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -706,6 +706,9 @@ class Application_Model_Scheduler $doUpdate = false; $values = array(); + //array that stores the cc_file ids so we can update the is_scheduled flag + $fileIds = array(); + foreach ($filesToInsert as &$file) { //item existed previously and is being moved. //need to keep same id for resources if we want REST. @@ -761,9 +764,6 @@ 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"];