Merge pull request #1190 from nlegoff/m-fix

[3.8] Some fixes
This commit is contained in:
Nicolas Le Goff
2014-11-26 00:20:37 +01:00
4 changed files with 8 additions and 6 deletions

View File

@@ -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') {

View File

@@ -880,10 +880,12 @@ class Login implements ControllerProviderInterface
$width = $height = null;
if ($app['request']->cookies->has('screen')) {
$data = explode('x', $app['request']->cookies->get('screen'));
$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)
->setScreenWidth($width);

View File

@@ -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));

View File

@@ -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) {