diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 5408ca788..eb7825381 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