diff --git a/lib/Alchemy/Phrasea/Controller/AbstractDelivery.php b/lib/Alchemy/Phrasea/Controller/AbstractDelivery.php index afd3d35eb9..81fa246c3e 100644 --- a/lib/Alchemy/Phrasea/Controller/AbstractDelivery.php +++ b/lib/Alchemy/Phrasea/Controller/AbstractDelivery.php @@ -38,7 +38,7 @@ abstract class AbstractDelivery implements ControllerProviderInterface $response = $app['phraseanet.file-serve']->deliverFile($pathOut, $file->get_file(), $disposition, $file->get_mime()); - if (in_array(array('document', 'preview'), $subdef)) { + if (in_array($subdef, array('document', 'preview'))) { $response->setPrivate(); $this->logView($app, $record, $request); } elseif ($subdef !== 'thumbnail') { diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/Controller/Root/Login.php index 60ff27affc..77bb89d835 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Login.php @@ -880,9 +880,11 @@ class Login implements ControllerProviderInterface $width = $height = null; if ($app['request']->cookies->has('screen')) { - $data = explode('x', $app['request']->cookies->get('screen')); - $width = $data[0]; - $height = $data[1]; + $data = array_filter((explode('x', $app['request']->cookies->get('screen', '')))); + if (count($data) === 2) { + $width = $data[0]; + $height = $data[1]; + } } $session->setIpAddress($app['request']->getClientIp()) ->setScreenHeight($height) diff --git a/lib/Alchemy/Phrasea/Security/Firewall.php b/lib/Alchemy/Phrasea/Security/Firewall.php index 4a31fe605e..dc53413333 100644 --- a/lib/Alchemy/Phrasea/Security/Firewall.php +++ b/lib/Alchemy/Phrasea/Security/Firewall.php @@ -106,7 +106,7 @@ class Firewall { $params = array(); if (null !== $request) { - $params['redirect'] = '..' . $request->getPathInfo(); + $params['redirect'] = '..' . $request->getPathInfo().'?'.$request->getQueryString(); } if (!$this->app['authentication']->isAuthenticated()) { return new RedirectResponse($this->app->path('homepage', $params)); diff --git a/www/skins/prod/jquery.main-prod.js b/www/skins/prod/jquery.main-prod.js index 9fe34d5f7b..028939b7dc 100644 --- a/www/skins/prod/jquery.main-prod.js +++ b/www/skins/prod/jquery.main-prod.js @@ -761,7 +761,7 @@ $(document).ready(function () { var parent = searchForm.parent(); var options = { - size: 'Full', + size: (bodySize.x - 120)+'x'+(bodySize.y - 120), loading: false, closeCallback: function (dialog) {