From 2185fc9ca46fabd42a9a8f8a6b51693d359f2e12 Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 13 Jan 2015 15:49:57 -0500 Subject: [PATCH] SAAS-536: Check for future scheduled files uses cloud_file id instead of cc_files id --- airtime_mvc/application/models/StoredFile.php | 2 +- airtime_mvc/application/models/airtime/CcFiles.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 328863f71..8a9cee9a0 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -377,7 +377,7 @@ SQL; public function delete() { // Check if the file is scheduled to be played in the future - if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) { + if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->_file->getCcFileId())) { throw new DeleteScheduledFileException(); } diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index b13eb05ce..3bd62a7a5 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -140,4 +140,9 @@ class CcFiles extends BaseCcFiles { return null; } + public function getCcFileId() + { + return $this->id; + } + } // CcFiles