Change download key parameter regex
This commit is contained in:
parent
6aafe25fd1
commit
4828e82d2a
|
@ -32,7 +32,7 @@ class PodcastEpisodes extends BasePodcastEpisodes
|
||||||
if ($podcast) {
|
if ($podcast) {
|
||||||
$fileId = $this->getDbFileId();
|
$fileId = $this->getDbFileId();
|
||||||
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
||||||
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download?download_key=$key";
|
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download/$key";
|
||||||
}
|
}
|
||||||
return parent::getDbDownloadUrl();
|
return parent::getDbDownloadUrl();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,14 +60,15 @@ class Rest_Bootstrap extends Zend_Application_Module_Bootstrap
|
||||||
|
|
||||||
/** MediaController Routes **/
|
/** MediaController Routes **/
|
||||||
$downloadRoute = new Zend_Controller_Router_Route(
|
$downloadRoute = new Zend_Controller_Router_Route(
|
||||||
'rest/media/:id/download',
|
'rest/media/:id/download/:download_key',
|
||||||
array(
|
array(
|
||||||
'controller' => 'media',
|
'controller' => 'media',
|
||||||
'action' => 'download',
|
'action' => 'download',
|
||||||
'module' => 'rest'
|
'module' => 'rest'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => '\d+'
|
'id' => '\d+',
|
||||||
|
'download_key' => '\w*'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$router->addRoute('download', $downloadRoute);
|
$router->addRoute('download', $downloadRoute);
|
||||||
|
|
Loading…
Reference in New Issue