CC-3975: Media Library: Try to download files from watched folder, the filename will be "true"
-added comment
This commit is contained in:
parent
1c345f2d36
commit
d5a5bdd310
|
@ -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 $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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue