From c586e3e2b8e1d41be6dd302a3f0638b2db178c68 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 28 Apr 2014 15:52:08 -0400 Subject: [PATCH] CC-5821: Airtime Analyzer: Ftp-uploaded folder doesn't get removed from organize Was using wrong position when using substr() --- .../application/modules/rest/controllers/MediaController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index eec9e1b10..d6881e831 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -144,7 +144,8 @@ class Rest_MediaController extends Zend_Rest_Controller if (isset($whiteList["full_path"])) { $fullPath = $whiteList["full_path"]; $basePath = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/organize/" : "/srv/airtime/stor/organize/"; - $relativePath = substr($fullPath, strlen($basePath)); + $relativePath = substr($fullPath, strlen($basePath)-1); + } else { $relativePath = $_FILES["file"]["name"]; }