diff --git a/Phraseanet-production-client/config/config.js b/Phraseanet-production-client/config/config.js index 9b644e52a2..a80d4c2d74 100644 --- a/Phraseanet-production-client/config/config.js +++ b/Phraseanet-production-client/config/config.js @@ -13,5 +13,5 @@ module.exports = { setupDir: _root + 'tests/setup/node.js', karmaConf: _root + 'config/karma.conf.js', // change this version when you change JS file for lazy loading - assetFileVersion: 94 + assetFileVersion: 95 }; diff --git a/Phraseanet-production-client/dist/authenticate.js b/Phraseanet-production-client/dist/authenticate.js index 5c0f8060eb..c481923e4c 100644 --- a/Phraseanet-production-client/dist/authenticate.js +++ b/Phraseanet-production-client/dist/authenticate.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=94"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=95"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/authenticate.min.js b/Phraseanet-production-client/dist/authenticate.min.js index 4c593b6b76..8e97739776 100644 --- a/Phraseanet-production-client/dist/authenticate.min.js +++ b/Phraseanet-production-client/dist/authenticate.min.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=94"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=95"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.js b/Phraseanet-production-client/dist/commons.js index 8121543b5d..fcaf2f0225 100644 --- a/Phraseanet-production-client/dist/commons.js +++ b/Phraseanet-production-client/dist/commons.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=94"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=95"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.min.js b/Phraseanet-production-client/dist/commons.min.js index e8a59b42b4..ab39527929 100644 --- a/Phraseanet-production-client/dist/commons.min.js +++ b/Phraseanet-production-client/dist/commons.min.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=94"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=95"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/lazy-1.js b/Phraseanet-production-client/dist/lazy-1.js index dc81be459f..743fc76122 100644 --- a/Phraseanet-production-client/dist/lazy-1.js +++ b/Phraseanet-production-client/dist/lazy-1.js @@ -64036,7 +64036,6 @@ var rangeCapture = function rangeCapture(services, datas) { } options.frameRates = {}; options.ratios = {}; - var coverUrl = ''; var generateSourcesTpl = function generateSourcesTpl(record) { var recordSources = []; _underscore2.default.each(record.sources, function (s, i) { @@ -64049,7 +64048,7 @@ var rangeCapture = function rangeCapture(services, datas) { }; var sources = generateSourcesTpl(record); - $container.append(''); + $container.append(''); // window.videojs = videojs; _video2.default.addLanguage(localeService.getLocale(), localeService.getTranslations()); diff --git a/Phraseanet-production-client/dist/lazy-1.min.js b/Phraseanet-production-client/dist/lazy-1.min.js index dc81be459f..743fc76122 100644 --- a/Phraseanet-production-client/dist/lazy-1.min.js +++ b/Phraseanet-production-client/dist/lazy-1.min.js @@ -64036,7 +64036,6 @@ var rangeCapture = function rangeCapture(services, datas) { } options.frameRates = {}; options.ratios = {}; - var coverUrl = ''; var generateSourcesTpl = function generateSourcesTpl(record) { var recordSources = []; _underscore2.default.each(record.sources, function (s, i) { @@ -64049,7 +64048,7 @@ var rangeCapture = function rangeCapture(services, datas) { }; var sources = generateSourcesTpl(record); - $container.append(''); + $container.append(''); // window.videojs = videojs; _video2.default.addLanguage(localeService.getLocale(), localeService.getTranslations()); diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js index d068c73eda..1f4247784a 100644 --- a/Phraseanet-production-client/dist/production.js +++ b/Phraseanet-production-client/dist/production.js @@ -63629,7 +63629,6 @@ var recordVideoEditorModal = function recordVideoEditorModal(services, datas) { openModal(datas, activeTab); }); }; - initialize(); toolsStream.subscribe(function (params) { switch (params.action) { diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js index d068c73eda..1f4247784a 100644 --- a/Phraseanet-production-client/dist/production.min.js +++ b/Phraseanet-production-client/dist/production.min.js @@ -63629,7 +63629,6 @@ var recordVideoEditorModal = function recordVideoEditorModal(services, datas) { openModal(datas, activeTab); }); }; - initialize(); toolsStream.subscribe(function (params) { switch (params.action) { diff --git a/Phraseanet-production-client/src/components/record/videoEditor/index.js b/Phraseanet-production-client/src/components/record/videoEditor/index.js index 4f43d40951..1ea0d272e3 100644 --- a/Phraseanet-production-client/src/components/record/videoEditor/index.js +++ b/Phraseanet-production-client/src/components/record/videoEditor/index.js @@ -26,7 +26,6 @@ const recordVideoEditorModal = (services, datas, activeTab = false) => { openModal(datas, activeTab); }); }; - initialize(); toolsStream.subscribe((params) => { switch (params.action) { diff --git a/Phraseanet-production-client/src/components/videoEditor/rangeCapture.js b/Phraseanet-production-client/src/components/videoEditor/rangeCapture.js index 475ca15141..1999017204 100644 --- a/Phraseanet-production-client/src/components/videoEditor/rangeCapture.js +++ b/Phraseanet-production-client/src/components/videoEditor/rangeCapture.js @@ -35,7 +35,6 @@ const rangeCapture = (services, datas, activeTab = false) => { } options.frameRates = {}; options.ratios = {}; - const coverUrl = ''; let generateSourcesTpl = (record) => { let recordSources = []; _.each(record.sources, (s, i) => { @@ -50,7 +49,7 @@ const rangeCapture = (services, datas, activeTab = false) => { let sources = generateSourcesTpl(record); $container.append( ``); + preload="none" width="100%" height="100%" data-setup='{"language":"${localeService.getLocale()}"}'>${sources} `); // window.videojs = videojs; videojs.addLanguage(localeService.getLocale(), localeService.getTranslations()); diff --git a/composer.json b/composer.json index 08eef8c780..d1f80937f5 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "php": ">=7.0 <7.1", "ext-intl": "*", "alchemy-fr/tcpdf-clone": "~6.0", - "alchemy/embed-bundle": "^2.0.7", + "alchemy/embed-bundle": "^2.0.15", "alchemy/geonames-api-consumer": "~0.1.0", "alchemy/mediavorus": "^0.4.4", "alchemy/oauth2php": "1.1.0", diff --git a/composer.lock b/composer.lock index 039f1fcf64..f15e7d1962 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "12f2708ee329327ead6eac100cdf302e", + "content-hash": "cab652a03aad457cf7239d3156a0514c", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -131,16 +131,16 @@ }, { "name": "alchemy/embed-bundle", - "version": "2.0.13", + "version": "2.0.15", "source": { "type": "git", "url": "https://github.com/alchemy-fr/embed-bundle.git", - "reference": "e7c53ac4f0bfedba2cbd4431040cd615703a4c23" + "reference": "835a6b0cfce6b966df1b73c3a651a742ebe9449a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/e7c53ac4f0bfedba2cbd4431040cd615703a4c23", - "reference": "e7c53ac4f0bfedba2cbd4431040cd615703a4c23", + "url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/835a6b0cfce6b966df1b73c3a651a742ebe9449a", + "reference": "835a6b0cfce6b966df1b73c3a651a742ebe9449a", "shasum": "" }, "require-dev": { @@ -178,10 +178,10 @@ ], "description": "Embed resources bundle", "support": { - "source": "https://github.com/alchemy-fr/embed-bundle/tree/2.0.13", + "source": "https://github.com/alchemy-fr/embed-bundle/tree/2.0.15", "issues": "https://github.com/alchemy-fr/embed-bundle/issues" }, - "time": "2021-10-01T13:22:39+00:00" + "time": "2023-10-14T10:42:19+00:00" }, { "name": "alchemy/geonames-api-consumer", @@ -8736,5 +8736,5 @@ "ext-intl": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.1.0" } diff --git a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php index b202679d40..63f4d25cac 100644 --- a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php +++ b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php @@ -1355,7 +1355,7 @@ private function getAndSaveToken($exposeName) $accessToken = $tokenInfo['access_token']; } elseif (is_array($tokenInfo) && $tokenInfo['expires_at'] > time()) { $accessToken = $tokenInfo['access_token']; - } elseif (is_array($tokenInfo) && $tokenInfo['expires_at'] <= time() && $tokenInfo['refresh_expires_at'] > time()) { + } elseif (is_array($tokenInfo) && $tokenInfo['expires_at'] <= time() && isset($tokenInfo['refresh_expires_at']) && $tokenInfo['refresh_expires_at'] > time()) { $resToken = $this->refreshToken($oauthClient, $config, $tokenInfo['refresh_token']); if ($resToken->getStatusCode() !== 200) { diff --git a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php index ff80e50df9..ffca44fd5d 100644 --- a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php +++ b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php @@ -62,7 +62,7 @@ public function getGlobals() { return [ // change this version when you change JS file to force the navigation to reload js file - 'assetFileVersion' => 94 + 'assetFileVersion' => 95 ]; } diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php index 41bbd14188..bd72160259 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/ExposeUploadWorker.php @@ -225,6 +225,7 @@ public function process(array $payload) 'publication_id' => $payload['publicationId'], 'description' => $description, 'asset_id' => $assetId, + 'title' => $record->get_title(), 'upload' => [ 'type' => $record->get_subdef($phraseanetSubdefAsDocument)->get_mime(), 'size' => $record->get_subdef($phraseanetSubdefAsDocument)->get_size(), @@ -472,9 +473,9 @@ private function getToken() if ($this->exposeConfiguration['connection_kind'] == 'password') { if (!isset($this->accessTokenInfo['expires_at'])) { return $this->accessTokenInfo['access_token']; - } elseif ($this->accessTokenInfo['expires_at'] > time() && $this->accessTokenInfo['refresh_expires_at'] > time()) { + } elseif ($this->accessTokenInfo['expires_at'] > time()) { return $this->accessTokenInfo['access_token']; - } elseif ($this->accessTokenInfo['expires_at'] <= time() && $this->accessTokenInfo['refresh_expires_at'] > time()) { + } elseif ($this->accessTokenInfo['expires_at'] <= time() && isset($tokenInfo['refresh_expires_at']) && $this->accessTokenInfo['refresh_expires_at'] > time()) { $resToken = $oauthClient->post($this->exposeConfiguration['oauth_token_uri'], [ 'form_params' => [ 'client_id' => $this->exposeConfiguration['auth_client_id'], diff --git a/templates/web/admin/phraseanet-service/expose.html.twig b/templates/web/admin/phraseanet-service/expose.html.twig index c9750bc95f..18cfc39528 100644 --- a/templates/web/admin/phraseanet-service/expose.html.twig +++ b/templates/web/admin/phraseanet-service/expose.html.twig @@ -48,7 +48,7 @@ {{ form_row(form.expose_client_id) }} -
+
{{ form_label(form.oauth_token_uri) }}
expose v2 : https://api-auth.phrasea.local/oauth/v2/token