diff --git a/composer.lock b/composer.lock
index 3794bfe80c..eb4523a2a5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -383,16 +383,16 @@
},
{
"name": "alchemy/phpexiftool",
- "version": "0.7.0",
+ "version": "0.7.2",
"source": {
"type": "git",
"url": "https://github.com/alchemy-fr/PHPExiftool.git",
- "reference": "7372ca4e43473328bf06bca810558fbad7bb2f95"
+ "reference": "ba1cb51eceb6562d7996023478977a8739de188b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/alchemy-fr/PHPExiftool/zipball/7372ca4e43473328bf06bca810558fbad7bb2f95",
- "reference": "7372ca4e43473328bf06bca810558fbad7bb2f95",
+ "url": "https://api.github.com/repos/alchemy-fr/PHPExiftool/zipball/ba1cb51eceb6562d7996023478977a8739de188b",
+ "reference": "ba1cb51eceb6562d7996023478977a8739de188b",
"shasum": ""
},
"require": {
@@ -443,8 +443,8 @@
},
{
"name": "Benoit Burnichon",
- "role": "Lead Developer",
- "email": "bburnichon@alchemy.fr"
+ "email": "bburnichon@alchemy.fr",
+ "role": "Lead Developer"
}
],
"description": "Exiftool driver for PHP",
@@ -452,7 +452,7 @@
"exiftool",
"metadata"
],
- "time": "2017-05-18T19:04:04+00:00"
+ "time": "2019-02-13T13:06:43+00:00"
},
{
"name": "alchemy/queue-bundle",
diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php
index f25e906f57..13c7728f86 100644
--- a/lib/Alchemy/Phrasea/Application.php
+++ b/lib/Alchemy/Phrasea/Application.php
@@ -665,7 +665,7 @@ class Application extends SilexApplication
private function setupGeonames()
{
$this['geonames.server-uri'] = $this->share(function (Application $app) {
- return $app['conf']->get(['registry', 'webservices', 'geonames-server'], 'http://geonames.alchemyasp.com/');
+ return $app['conf']->get(['registry', 'webservices', 'geonames-server'], 'https://geonames.alchemyasp.com/');
});
}
diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
index 5bb3e10614..39361d46da 100644
--- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
+++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php
@@ -944,7 +944,7 @@ class V1Controller extends Controller
}
$originalName = $pi['filename'] . '.' . $pi['extension'];
- $newPathname = $tempfile;
+ $uploadedFilename = $newPathname = $tempfile;
}
}
else {
@@ -956,8 +956,11 @@ class V1Controller extends Controller
if (!$file->isValid()) {
return $this->getBadRequestAction($request, 'Data corrupted, please try again');
}
+
+ $uploadedFilename = $file->getPathname();
$originalName = $file->getClientOriginalName();
$newPathname = $file->getPathname() . '.' . $file->getClientOriginalExtension();
+
if (false === rename($file->getPathname(), $newPathname)) {
return Result::createError($request, 403, 'Error while renaming file')->createResponse();
}
@@ -1010,6 +1013,11 @@ class V1Controller extends Controller
$nosubdef = $request->get('nosubdefs') === '' || \p4field::isyes($request->get('nosubdefs'));
$this->getBorderManager()->process($session, $Package, $callback, $behavior, $nosubdef);
+ // remove $newPathname on temporary directory
+ if ($newPathname !== $uploadedFilename) {
+ @rename($newPathname, $uploadedFilename);
+ }
+
$ret = ['entity' => null];
if ($output instanceof \record_adapter) {
@@ -1081,6 +1089,11 @@ class V1Controller extends Controller
}
}
+ // remove $newPathname on temporary directory
+ if ($renamedFilename !== $uploadedFilename) {
+ @rename($renamedFilename, $uploadedFilename);
+ }
+
return Result::create($request, $ret)->createResponse();
}
diff --git a/lib/Alchemy/Phrasea/Controller/Prod/PushController.php b/lib/Alchemy/Phrasea/Controller/Prod/PushController.php
index 569537fed3..f9ce528e41 100644
--- a/lib/Alchemy/Phrasea/Controller/Prod/PushController.php
+++ b/lib/Alchemy/Phrasea/Controller/Prod/PushController.php
@@ -463,6 +463,8 @@ class PushController extends Controller
}
try {
+ $manager = $this->getEntityManager();
+
$password = $this->getRandomGenerator()->generateString(128);
$user = $this->getUserManipulator()->createUser($email, $password, $email);
@@ -476,12 +478,15 @@ class PushController extends Controller
$user->setCompany($request->request->get('company'));
}
if ($request->request->get('job')) {
- $user->setCompany($request->request->get('job'));
+ $user->setJob($request->request->get('job'));
}
- if ($request->request->get('form_geonameid')) {
- $this->getUserManipulator()->setGeonameId($user, $request->request->get('form_geonameid'));
+ if ($request->request->get('city')) {
+ $this->getUserManipulator()->setGeonameId($user, $request->request->get('city'));
}
+ $manager->persist($user);
+ $manager->flush();
+
$result['message'] = $this->app->trans('User successfully created');
$result['success'] = true;
$result['user'] = $this->formatUser($user);
diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php
index a362540935..1e8724c0ee 100644
--- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php
+++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php
@@ -179,7 +179,6 @@ class QueryController extends Controller
};
$userManipulator->setUserSetting($user, 'last_jsonquery', (string)$request->request->get('jsQuery'));
-
$jsQuery = @json_decode((string)$request->request->get('jsQuery'), true);
if(($ft = $findFulltext($jsQuery['query'])) !== null) {
$userManipulator->setUserSetting($user, 'start_page_query', $ft);
@@ -317,7 +316,7 @@ class QueryController extends Controller
'
. ''
- . $this->app->trans('%total% reponses', ['%total%' => ''.$result->getTotal().' ']) . ' ';
+ . $this->app->trans('%total% reponses', ['%total%' => ''.number_format($result->getTotal(),null, null, ' ').' ']) . '';
$json['infos'] = $infoResult;
$json['navigationTpl'] = $string;
diff --git a/lib/Alchemy/Phrasea/Controller/Root/LoginController.php b/lib/Alchemy/Phrasea/Controller/Root/LoginController.php
index ecb65abc47..c0a05be25f 100644
--- a/lib/Alchemy/Phrasea/Controller/Root/LoginController.php
+++ b/lib/Alchemy/Phrasea/Controller/Root/LoginController.php
@@ -265,7 +265,7 @@ class LoginController extends Controller
return $this->render('login/register-classic.html.twig', array_merge(
$this->getDefaultTemplateVariables($request),
[
- 'geonames_server_uri' => str_replace(sprintf('%s:', parse_url($url, PHP_URL_SCHEME)), '', $url),
+ 'geonames_server_uri' => $url,
'form' => $form->createView()
]));
}
diff --git a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php
index fbf4526d05..fbce72ccc7 100644
--- a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php
+++ b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php
@@ -146,7 +146,7 @@ class RegistryFormManipulator
],
'webservices' => [
'google-charts-enabled' => true,
- 'geonames-server' => 'http://geonames.alchemyasp.com/',
+ 'geonames-server' => 'https://geonames.alchemyasp.com/',
'captchas-enabled' => false,
'recaptcha-public-key' => '',
'recaptcha-private-key' => '',
diff --git a/lib/Alchemy/Phrasea/Media/SubdefGenerator.php b/lib/Alchemy/Phrasea/Media/SubdefGenerator.php
index 2dede228c5..88867551a1 100644
--- a/lib/Alchemy/Phrasea/Media/SubdefGenerator.php
+++ b/lib/Alchemy/Phrasea/Media/SubdefGenerator.php
@@ -61,7 +61,7 @@ class SubdefGenerator
public function generateSubdefs(\record_adapter $record, array $wanted_subdefs = null)
{
- if ($record->get_hd_file() !== null) {
+ if ($record->get_hd_file() !== null && $record->get_hd_file()->getMimeType() == "application/x-indesign") {
$mediaSource = $this->mediavorus->guess($record->get_hd_file()->getPathname());
$metadatas = $mediaSource->getMetadatas();
@@ -69,15 +69,27 @@ class SubdefGenerator
if(!isset($this->tmpFilesystem)){
$this->tmpFilesystem = Manager::create();
}
- $tmpDir = $this->tmpFilesystem->createTemporaryDirectory();
+ $tmpDir = $this->tmpFilesystem->createTemporaryDirectory(0777, 500);
- try {
- $this->app['filesystem']->dumpFile($tmpDir.'/file.jpg', $metadatas->get('XMP-xmp:PageImage')->getValue()->asString());
- $this->tmpFilePath = $tmpDir.'/file.jpg';
- } catch (\Exception $e) {
- $this->logger->error(sprintf('Unable to write temporary file : %s', $e->getMessage()));
+ $files = $this->app['exiftool.preview-extractor']->extract($record->get_hd_file()->getPathname(), $tmpDir);
+
+ $selected = null;
+ $size = null;
+
+ foreach ($files as $file) {
+ if ($file->isDir() || $file->isDot()) {
+ continue;
+ }
+
+ if (is_null($selected) || $file->getSize() > $size) {
+ $selected = $file->getPathname();
+ $size = $file->getSize();
+ }
}
+ if ($selected) {
+ $this->tmpFilePath = $selected;
+ }
}
}
diff --git a/package.json b/package.json
index d93ac787a6..84823d0938 100644
--- a/package.json
+++ b/package.json
@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0",
"npm": "^6.0.0",
"npm-modernizr": "^2.8.3",
- "phraseanet-production-client": "^0.34.53-d",
+ "phraseanet-production-client": "0.34.72-d",
"requirejs": "^2.3.5",
"tinymce": "^4.0.28",
"underscore": "^1.8.3",
diff --git a/resources/www/common/js/components/common.js b/resources/www/common/js/components/common.js
index d19965e696..39c6ddf3c8 100644
--- a/resources/www/common/js/components/common.js
+++ b/resources/www/common/js/components/common.js
@@ -31,17 +31,13 @@ var commonModule = (function ($, p4) {
$(this).removeClass('context-menu-item-hover');
});
- // $('#help-trigger').contextMenu('#mainMenu .helpcontextmenu', {openEvt: 'click', dropDown: true, theme: 'vista', dropDown: true,
- // showTransition: 'slideDown',
- // hideTransition: 'hide',
- // shadow: false
- // });
$('body').on('click', '.infoDialog', function (event) {
infoDialog($(this));
});
});
+
function showOverlay(n, appendto, callback, zIndex) {
var div = "OVERLAY";
diff --git a/resources/www/common/styles/main.scss b/resources/www/common/styles/main.scss
index 6a99013e9b..805e018608 100644
--- a/resources/www/common/styles/main.scss
+++ b/resources/www/common/styles/main.scss
@@ -88,4 +88,20 @@ $mainMenuLinkBackgroundHoverColor: transparent;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.39);
}
}
+/*Help menu*/
+.contextMenu.helpcontextmenu {
+ display: none;
+ &.shown {
+ display: block;
+ position: absolute;
+ z-index: 101;
+ }
+}
+.help-trigger {
+ display:inline-block;
+ cursor:pointer;
+ padding: 0 4px;
+ border:none;
+ margin-left: -12px;
+}
diff --git a/resources/www/prod/images/Basket/Browser/archive.png b/resources/www/prod/images/Basket/Browser/archive.png
index f7373f9614..ab89643a35 100644
Binary files a/resources/www/prod/images/Basket/Browser/archive.png and b/resources/www/prod/images/Basket/Browser/archive.png differ
diff --git a/resources/www/prod/images/Basket/Browser/archived.png b/resources/www/prod/images/Basket/Browser/archived.png
index 3e34e45736..6015eafc48 100644
Binary files a/resources/www/prod/images/Basket/Browser/archived.png and b/resources/www/prod/images/Basket/Browser/archived.png differ
diff --git a/resources/www/report/styles/main.scss b/resources/www/report/styles/main.scss
index 75030126a9..218fce1f28 100644
--- a/resources/www/report/styles/main.scss
+++ b/resources/www/report/styles/main.scss
@@ -110,7 +110,7 @@ $select-height: 26px;
}
.input-prepend {
margin: 0;
-
+
.dmin, .dmax {
border: 0 none;
height: 16px;
@@ -203,7 +203,7 @@ $select-height: 26px;
height: $select-height;
}
.select-styled {
- position: absolute;
+ position: absolute;
top: 0;
right: 0;
bottom: 0;
@@ -232,9 +232,9 @@ $select-height: 26px;
background-color: darken($select-background, 5);
}
}
-
+
.select-options {
- display: none;
+ display: none;
position: absolute;
top: 12px;
right: -12px;
@@ -292,7 +292,7 @@ $select-height: 26px;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-
+
&:hover {
background-color: #2c2c2c;
}
@@ -355,4 +355,8 @@ $select-height: 26px;
&.ui-widget-content{
background-color: #212121;
}
-}
\ No newline at end of file
+}
+
+#mainMenu li .context-menu-item-inner a:hover {
+ color: #000;
+}
diff --git a/templates/web/admin/editusers.html.twig b/templates/web/admin/editusers.html.twig
index 4b07dea1d3..2421976775 100644
--- a/templates/web/admin/editusers.html.twig
+++ b/templates/web/admin/editusers.html.twig
@@ -512,7 +512,7 @@
{{ 'admin::compte-utilisateur poste' | trans }}
-
+
@@ -528,7 +528,7 @@
{{ 'admin::compte-utilisateur activite' | trans }}
-
+
diff --git a/templates/web/common/menubar.html.twig b/templates/web/common/menubar.html.twig
index 84ab930e7d..3821f42e79 100644
--- a/templates/web/common/menubar.html.twig
+++ b/templates/web/common/menubar.html.twig
@@ -25,103 +25,103 @@
@@ -235,11 +235,10 @@
{{ 'phraseanet:: aide' | trans }}
-
-