From 452c17650c4426321fabbf73751edc525ce3bb5e Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 16 Jul 2015 11:03:30 -0400 Subject: [PATCH 1/2] SAAS-951 - fix SoundCloud capitalization --- airtime_mvc/application/configs/constants.php | 1 + airtime_mvc/application/controllers/LibraryController.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index aaed5d901..c7c062066 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -103,6 +103,7 @@ define('PROVISIONING_STATUS_ACTIVE' , 'Active'); define("TUNEIN_API_URL", "http://air.radiotime.com/Playing.ashx"); // SoundCloud +define('SOUNDCLOUD', 'SoundCloud'); define('DEFAULT_SOUNDCLOUD_LICENSE_TYPE', 'all-rights-reserved'); define('DEFAULT_SOUNDCLOUD_SHARING_TYPE', 'public'); diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 2ad032973..182979c03 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -16,8 +16,6 @@ class LibraryController extends Zend_Controller_Action ->addActionContext('delete-group', 'json') ->addActionContext('context-menu', 'json') ->addActionContext('get-file-metadata', 'html') - ->addActionContext('upload-file-soundcloud', 'json') - ->addActionContext('get-upload-to-soundcloud-status', 'json') ->addActionContext('set-num-entries', 'json') ->addActionContext('edit-file-md', 'json') ->initContext(); @@ -275,7 +273,7 @@ class LibraryController extends Zend_Controller_Action $menu["sep1"] = "-----------"; //create a sub menu for Soundcloud actions. - $menu["soundcloud"] = array("name" => _("Soundcloud"), "icon" => "soundcloud", "items" => array()); + $menu["soundcloud"] = array("name" => _(SOUNDCLOUD), "icon" => "soundcloud", "items" => array()); $serviceId = $soundcloudService->getServiceId($id); if (!is_null($file) && $serviceId != 0) { From 0dd2958333d5271f70e5e8a68d64e24a7b5d06dd Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 16 Jul 2015 14:24:07 -0400 Subject: [PATCH 2/2] SAAS-922 - urlencode content headers to ensure compatibility --- .../application/cloud_storage/Amazon_S3StorageBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php index 0d86ef52c..2f023aeea 100644 --- a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php +++ b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php @@ -46,7 +46,7 @@ class Amazon_S3StorageBackend extends StorageBackend { $urls = array(); - $s3args = array('ResponseContentDisposition' => 'attachment; filename="' . $contentDispositionFilename. '"'); + $s3args = array('ResponseContentDisposition' => 'attachment; filename="' . urlencode($contentDispositionFilename) . '"'); $signedS3Url = $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes', $s3args); //If we're using the proxy cache, we need to modify the request URL after it has @@ -65,7 +65,7 @@ class Amazon_S3StorageBackend extends StorageBackend $p["path"] = substr($p["path"], 1 + strlen($this->getBucket())); } $proxyUrl = $p["scheme"] . "://" . $p["host"] . $p["path"] . "?" . $p["query"]; - //Add this proxy cache URL to the list of download URLs. + //Add this proxy cache URL to the list of download URLs.s array_push($urls, $proxyUrl); }