This commit is contained in:
Pierre Rudloff 2016-12-03 14:01:35 +01:00
parent a426f3297a
commit a6447e9813

View file

@ -231,11 +231,17 @@ class FrontController
$params = $request->getQueryParams(); $params = $request->getQueryParams();
if (isset($params['url'])) { if (isset($params['url'])) {
try { try {
$url = $this->download->getURL($params['url'], $request->getParam('format'), $this->sessionSegment->getFlash($params['url'])); $url = $this->download->getURL(
$params['url'],
$request->getParam('format'),
$this->sessionSegment->getFlash($params['url'])
);
return $response->withRedirect($url); return $response->withRedirect($url);
} catch (PasswordException $e) { } catch (PasswordException $e) {
return $response->withRedirect($this->container->get('router')->pathFor('video').'?url='.urlencode($params['url'])); return $response->withRedirect(
$this->container->get('router')->pathFor('video').'?url='.urlencode($params['url'])
);
} catch (\Exception $e) { } catch (\Exception $e) {
$response->getBody()->write($e->getMessage()); $response->getBody()->write($e->getMessage());