style(legacy): format files (#1946)
This commit is contained in:
parent
eb19283d96
commit
4d393fa14e
66 changed files with 775 additions and 565 deletions
|
@ -8,7 +8,8 @@ class Rest_Bootstrap extends Zend_Application_Module_Bootstrap
|
|||
$router = $front->getRouter();
|
||||
|
||||
$restRoute = new Zend_Rest_Route($front, [], [
|
||||
'rest' => ['media', 'show-image', 'podcast', 'podcast-episodes'], ]);
|
||||
'rest' => ['media', 'show-image', 'podcast', 'podcast-episodes'],
|
||||
]);
|
||||
$router->addRoute('rest', $restRoute);
|
||||
|
||||
$podcastBulkRoute = new Zend_Controller_Router_Route(
|
||||
|
|
|
@ -96,7 +96,7 @@ class Rest_PodcastEpisodesController extends Zend_Rest_Controller
|
|||
$resp = $this->getResponse();
|
||||
$resp->setHttpResponseCode(400);
|
||||
$resp->appendBody('ERROR: Episode ID should not be specified when using POST. POST is only used for '
|
||||
. 'importing podcast episodes, and an episode ID will be chosen by Airtime');
|
||||
. 'importing podcast episodes, and an episode ID will be chosen by Airtime');
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -256,8 +256,8 @@ class Rest_ShowImageController extends Zend_Rest_Controller
|
|||
unlink($image_file); // remove the file after failed rename
|
||||
|
||||
throw new Exception('The file was not uploaded, this error can occur if the computer '
|
||||
. 'hard drive does not have enough disk space or the stor '
|
||||
. 'directory does not have correct write permissions.');
|
||||
. 'hard drive does not have enough disk space or the stor '
|
||||
. 'directory does not have correct write permissions.');
|
||||
}
|
||||
|
||||
return $image_stor;
|
||||
|
|
|
@ -5,7 +5,8 @@ class RestAuth
|
|||
public static function verifyAuth($checkApiKey, $checkSession, $action)
|
||||
{
|
||||
// Session takes precedence over API key for now:
|
||||
if ($checkSession && self::verifySession()
|
||||
if (
|
||||
$checkSession && self::verifySession()
|
||||
|| $checkApiKey && self::verifyAPIKey($action)
|
||||
) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue