Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-3520_stamper-enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier authored Oct 23, 2023
2 parents 35a6991 + fc3baaf commit 8f4732b
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Phraseanet-production-client/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/authenticate.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion Phraseanet-production-client/dist/commons.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions Phraseanet-production-client/dist/lazy-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -64049,7 +64048,7 @@ var rangeCapture = function rangeCapture(services, datas) {
};

var sources = generateSourcesTpl(record);
$container.append('<video id="embed-video" class="embed-resource video-js vjs-default-skin vjs-big-play-centered" controls\n preload="none" width="100%" height="100%" poster="' + coverUrl + '" data-setup=\'{"language":"' + localeService.getLocale() + '"}\'>' + sources + ' </video>');
$container.append('<video id="embed-video" class="embed-resource video-js vjs-default-skin vjs-big-play-centered" controls\n preload="none" width="100%" height="100%" data-setup=\'{"language":"' + localeService.getLocale() + '"}\'>' + sources + ' </video>');

// window.videojs = videojs;
_video2.default.addLanguage(localeService.getLocale(), localeService.getTranslations());
Expand Down
3 changes: 1 addition & 2 deletions Phraseanet-production-client/dist/lazy-1.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -64049,7 +64048,7 @@ var rangeCapture = function rangeCapture(services, datas) {
};

var sources = generateSourcesTpl(record);
$container.append('<video id="embed-video" class="embed-resource video-js vjs-default-skin vjs-big-play-centered" controls\n preload="none" width="100%" height="100%" poster="' + coverUrl + '" data-setup=\'{"language":"' + localeService.getLocale() + '"}\'>' + sources + ' </video>');
$container.append('<video id="embed-video" class="embed-resource video-js vjs-default-skin vjs-big-play-centered" controls\n preload="none" width="100%" height="100%" data-setup=\'{"language":"' + localeService.getLocale() + '"}\'>' + sources + ' </video>');

// window.videojs = videojs;
_video2.default.addLanguage(localeService.getLocale(), localeService.getTranslations());
Expand Down
1 change: 0 additions & 1 deletion Phraseanet-production-client/dist/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -63629,7 +63629,6 @@ var recordVideoEditorModal = function recordVideoEditorModal(services, datas) {
openModal(datas, activeTab);
});
};
initialize();

toolsStream.subscribe(function (params) {
switch (params.action) {
Expand Down
1 change: 0 additions & 1 deletion Phraseanet-production-client/dist/production.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -63629,7 +63629,6 @@ var recordVideoEditorModal = function recordVideoEditorModal(services, datas) {
openModal(datas, activeTab);
});
};
initialize();

toolsStream.subscribe(function (params) {
switch (params.action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const recordVideoEditorModal = (services, datas, activeTab = false) => {
openModal(datas, activeTab);
});
};
initialize();

toolsStream.subscribe((params) => {
switch (params.action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -50,7 +49,7 @@ const rangeCapture = (services, datas, activeTab = false) => {
let sources = generateSourcesTpl(record);
$container.append(
`<video id="embed-video" class="embed-resource video-js vjs-default-skin vjs-big-play-centered" controls
preload="none" width="100%" height="100%" poster="${coverUrl}" data-setup='{"language":"${localeService.getLocale()}"}'>${sources} </video>`);
preload="none" width="100%" height="100%" data-setup='{"language":"${localeService.getLocale()}"}'>${sources} </video>`);

// window.videojs = videojs;
videojs.addLanguage(localeService.getLocale(), localeService.getTranslations());
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
];

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion templates/web/admin/phraseanet-service/expose.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{{ form_row(form.expose_client_id) }}
</div>

<div class="control-group auth-field">
<div class="control-group">
{{ form_label(form.oauth_token_uri) }}
<div style="margin-top: 10px; margin-bottom: 10px;">
expose v2 : https://api-auth.phrasea.local/oauth/v2/token
Expand Down

0 comments on commit 8f4732b

Please sign in to comment.