From 8141dec3b55bec0f64f465a9713d6acf51610c66 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 27 Jun 2012 15:13:03 -0400 Subject: [PATCH] CC-3975: Media Library: Try to download files from watched folder, the filename will be "true" -added comment --- 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 03bd6cd6d..c1a692c44 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -131,6 +131,9 @@ class ApiController extends Zend_Controller_Action $full_path = $media->getPropelOrm()->getDbFilepath(); $file_base_name = strrchr($full_path, '/'); + /* If $full_path does not contain a '/', strrchr will return false, + * in which case we can use $full_path as the base name. + */ if (!$file_base_name) { $file_base_name = $full_path; }