From 35c450be3f4ad86f0506b7325dcbb611491f39c7 Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 12 Aug 2014 11:33:10 -0400 Subject: [PATCH] Audio preview fix --- airtime_mvc/application/models/StoredFile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 74bb51d2d..eef7ab850 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -597,16 +597,18 @@ SQL; /* TODO: Callers of this function should use a Propel transaction. Start * by creating $con outside the function with beingTransaction() */ public static function RecallById($p_id=null, $con=null) { + $p_id = intval($p_id); //TODO if (is_null($con)) { $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME); } if (isset($p_id)) { - $storedFile = CcFilesQuery::create()->findPK(intval($p_id), $con); + $storedFile = CcFilesQuery::create()->findPK($p_id, $con); if (is_null($storedFile)) { throw new Exception("Could not recall file with id: ".$p_id); } + //Attempt to get the cloud file object and return it. If no cloud //file object is found then we are dealing with a regular stored //object so return that