From bdaa64d4d13acb344af438c969929fdffe74d02d Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 27 Jun 2012 13:13:07 -0400 Subject: [PATCH] CC-3975: Media Library: Try to download files from watched folder, the filename will be "true" -fixed (originally scheduled for 2.2 - adding for 2.1.3) --- airtime_mvc/application/controllers/ApiController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 296cfcdaf..4547230d5 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -129,6 +129,9 @@ class ApiController extends Zend_Controller_Action if(is_file($filepath)){ $full_path = $media->getPropelOrm()->getDbFilepath(); $file_base_name = strrchr($full_path, '/'); + if (!$file_base_name) { + $file_base_name = $full_path; + } $file_base_name = substr($file_base_name, 1); // possibly use fileinfo module here in the future. // http://www.php.net/manual/en/book.fileinfo.php