mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Merge branch 'master' of https://github.com/alchemy-fr/Phraseanet into PHRAS-3371-navigation-keyboard
This commit is contained in:
@@ -4,8 +4,7 @@ use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
|
||||
use Alchemy\Phrasea\WorkerManager\Queue\MessagePublisher;
|
||||
|
||||
|
||||
class patch_413_PHRAS_3282 implements patchInterface
|
||||
class patch_413 implements patchInterface
|
||||
{
|
||||
const OLDQ2NEWQ_ttl_retry = [
|
||||
'assetsIngest' => MessagePublisher::ASSETS_INGEST_TYPE,
|
||||
@@ -26,6 +25,7 @@ class patch_413_PHRAS_3282 implements patchInterface
|
||||
'delayedSubdef' => MessagePublisher::SUBDEF_CREATION_TYPE,
|
||||
'delayedWriteMeta' => MessagePublisher::WRITE_METADATAS_TYPE,
|
||||
];
|
||||
|
||||
/** @var string */
|
||||
private $release = '4.1.3';
|
||||
/** @var array */
|
||||
@@ -80,6 +80,34 @@ class patch_413_PHRAS_3282 implements patchInterface
|
||||
|
||||
private function patch_databox(base $databox, Application $app)
|
||||
{
|
||||
// patch to invert push and validation action in log_docs
|
||||
|
||||
// add a new temp action
|
||||
$sql = "ALTER TABLE log_docs CHANGE action action ENUM('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete','to_do','') CHARACTER SET ascii COLLATE ascii_bin NOT NULL";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'to_do' where action = 'push'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'push' where action = 'validate'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'validate' where action = 'to_do'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
// remove temp action
|
||||
$sql = "ALTER TABLE log_docs CHANGE action action ENUM('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete','') CHARACTER SET ascii COLLATE ascii_bin NOT NULL";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
|
||||
private function patch_appbox(base $databox, Application $app)
|
||||
@@ -115,5 +143,20 @@ class patch_413_PHRAS_3282 implements patchInterface
|
||||
$conf->remove(['workers', 'retry_queue']);
|
||||
$conf->remove(['workers', 'pull_assets']);
|
||||
$conf->remove(['workers', 'validationReminder']);
|
||||
|
||||
// patch for reminder validation key, default value to 20
|
||||
$conf->remove(['registry', 'actions', 'validation-reminder-days']);
|
||||
$conf->set(['registry', 'actions', 'validation-reminder-time-left-percent'], 20);
|
||||
|
||||
// if not exist add maxResultWindow key
|
||||
if (!$conf->has(['main', 'search-engine', 'options', 'maxResultWindow'])) {
|
||||
$conf->set(['main', 'search-engine', 'options', 'maxResultWindow'], 500000);
|
||||
}
|
||||
|
||||
// if not exist add populate_permalinks key
|
||||
if (!$conf->has(['main', 'search-engine', 'options', 'populate_permalinks'])) {
|
||||
$conf->set(['main', 'search-engine', 'options', 'populate_permalinks'], false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
|
||||
use Alchemy\Phrasea\WorkerManager\Queue\MessagePublisher;
|
||||
|
||||
|
||||
class patch_413_PHRAS_3278 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '4.1.3';
|
||||
|
||||
/** @var array */
|
||||
private $concern = [base::APPLICATION_BOX, base::DATA_BOX];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_release()
|
||||
{
|
||||
return $this->release;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDoctrineMigrations()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function require_all_upgrades()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function concern()
|
||||
{
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply(base $base, Application $app)
|
||||
{
|
||||
if ($base->get_base_type() === base::DATA_BOX) {
|
||||
$this->patch_databox($base, $app);
|
||||
}
|
||||
elseif ($base->get_base_type() === base::APPLICATION_BOX) {
|
||||
$this->patch_appbox($base, $app);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function patch_appbox(base $databox, Application $app)
|
||||
{
|
||||
/** @var PropertyAccess $conf */
|
||||
$conf = $app['conf'];
|
||||
|
||||
// patch for reminder validation key, default value to 20
|
||||
$conf->remove(['registry', 'actions', 'validation-reminder-days']);
|
||||
$conf->set(['registry', 'actions', 'validation-reminder-time-left-percent'], 20);
|
||||
|
||||
// if not exist add maxResultWindow key
|
||||
if (!$conf->has(['main', 'search-engine', 'options', 'maxResultWindow'])) {
|
||||
$conf->set(['main', 'search-engine', 'options', 'maxResultWindow'], 500000);
|
||||
}
|
||||
|
||||
// if not exist add populate_permalinks key
|
||||
if (!$conf->has(['main', 'search-engine', 'options', 'populate_permalinks'])) {
|
||||
$conf->set(['main', 'search-engine', 'options', 'populate_permalinks'], false);
|
||||
}
|
||||
}
|
||||
|
||||
private function patch_databox(base $databox, Application $app)
|
||||
{
|
||||
// patch to invert push and validation action in log_docs
|
||||
|
||||
// add a new temp action
|
||||
$sql = "ALTER TABLE log_docs CHANGE action action ENUM('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete','to_do','') CHARACTER SET ascii COLLATE ascii_bin NOT NULL";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'to_do' where action = 'push'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'push' where action = 'validate'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
$sql = "UPDATE log_docs SET action = 'validate' where action = 'to_do'";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
||||
// remove temp action
|
||||
$sql = "ALTER TABLE log_docs CHANGE action action ENUM('push','add','validate','edit','collection','status','print','substit','publish','download','mail','ftp','delete','') CHARACTER SET ascii COLLATE ascii_bin NOT NULL";
|
||||
$stmt = $databox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2021-02-19T06:46:05Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
@@ -7,8 +7,8 @@
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
||||
<source></source>
|
||||
<target state="new"></target>
|
||||
<source/>
|
||||
<target state="new"/>
|
||||
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
||||
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
@@ -1565,9 +1565,9 @@
|
||||
<target state="translated">Nach Feld</target>
|
||||
<jms:reference-file line="468">web/prod/index.html.twig</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%">
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%" approved="no">
|
||||
<source>CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</source>
|
||||
<target state="new">CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</target>
|
||||
<target state="needs-translation">Nutzungsbedingungen erzeugt %updated_on% und gedruckt %printed_on%</target>
|
||||
<jms:reference-file line="73">Out/Module/PDFCgu.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="48bf97f55c15fa2acb0a283e3a7e3f4f738b781d" resname="CHAMPS" approved="yes">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2021-02-19T06:46:44Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
@@ -7,8 +7,8 @@
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
||||
<source></source>
|
||||
<target state="new"></target>
|
||||
<source/>
|
||||
<target state="new"/>
|
||||
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
||||
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
@@ -1566,9 +1566,9 @@
|
||||
<target state="translated">By field</target>
|
||||
<jms:reference-file line="468">web/prod/index.html.twig</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%">
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%" approved="no">
|
||||
<source>CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</source>
|
||||
<target state="new">CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</target>
|
||||
<target state="needs-translation">Terms of use generated on %updated_on% and printed on %printed_on%</target>
|
||||
<jms:reference-file line="73">Out/Module/PDFCgu.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="48bf97f55c15fa2acb0a283e3a7e3f4f738b781d" resname="CHAMPS" approved="yes">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
|
||||
<file date="2021-02-19T06:47:23Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
|
||||
<header>
|
||||
@@ -7,8 +7,8 @@
|
||||
</header>
|
||||
<body>
|
||||
<trans-unit id="da39a3ee5e6b4b0d3255bfef95601890afd80709" resname="">
|
||||
<source></source>
|
||||
<target state="new"></target>
|
||||
<source/>
|
||||
<target state="new"/>
|
||||
<jms:reference-file line="47">Form/Configuration/EmailFormType.php</jms:reference-file>
|
||||
<jms:reference-file line="60">Form/Login/PhraseaAuthenticationForm.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
@@ -1565,9 +1565,9 @@
|
||||
<target state="translated">Par champ</target>
|
||||
<jms:reference-file line="468">web/prod/index.html.twig</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%">
|
||||
<trans-unit id="0a914720aec0221a6fddee9e3a7ef36f633295bc" resname="CGU::PDF CGU generated on %updated_on% and printed on %printed_on%" approved="no">
|
||||
<source>CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</source>
|
||||
<target state="new">CGU::PDF CGU generated on %updated_on% and printed on %printed_on%</target>
|
||||
<target state="needs-translation">CGU générée le %updated_on% et imprimée le %printed_on%</target>
|
||||
<jms:reference-file line="73">Out/Module/PDFCgu.php</jms:reference-file>
|
||||
</trans-unit>
|
||||
<trans-unit id="48bf97f55c15fa2acb0a283e3a7e3f4f738b781d" resname="CHAMPS" approved="yes">
|
||||
|
Reference in New Issue
Block a user