diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index c209691c0b..5f488cdd5a 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -16,7 +16,7 @@ class Version /** * @var string */ - private $number = '4.1.0-alpha.19a'; + private $number = '4.1.0-alpha.20a'; /** * @var string diff --git a/lib/classes/patch/410alpha20a.php b/lib/classes/patch/410alpha20a.php new file mode 100644 index 0000000000..ff02a35c96 --- /dev/null +++ b/lib/classes/patch/410alpha20a.php @@ -0,0 +1,111 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function getDoctrineMigrations() + { + return []; + } + + /** + * {@inheritdoc} + */ + public function apply(base $databox, Application $app) + { + // fix the Longitude value + + $sql = 'SELECT id, record_id, name, value FROM technical_datas WHERE trim(name) = "LongitudeRef" '; + $stmt = $databox->get_connection()->prepare($sql); + $stmt->execute(); + $rs = $stmt->fetchAll(PDO::FETCH_ASSOC); + $stmt->closeCursor(); + + foreach ($rs as $row) { + if (trim($row['value']) === 'W' ) { + $sql = 'UPDATE technical_datas SET value = CONCAT("-", value) WHERE trim(name) = "Longitude" AND record_id =:record_id'; + $stmt = $databox->get_connection()->prepare($sql); + $stmt->execute([':record_id' => $row['record_id']]); + } + + $sqlDelete = 'DELETE FROM technical_datas WHERE id =:id'; + + $stmt1 = $databox->get_connection()->prepare($sqlDelete); + $stmt1->execute([':id' => $row['id']]); + $stmt1->closeCursor(); + } + + $stmt->closeCursor(); + + // fix the Latitude value + + $sql = 'SELECT id, record_id, name, value FROM technical_datas WHERE trim(name) = "LatitudeRef" '; + $stmt = $databox->get_connection()->prepare($sql); + $stmt->execute(); + $rs = $stmt->fetchAll(PDO::FETCH_ASSOC); + $stmt->closeCursor(); + + foreach ($rs as $row) { + if (trim($row['value']) === 'S' ) { + $sql = 'UPDATE technical_datas SET value = CONCAT("-", value) WHERE trim(name) = "Latitude" AND record_id =:record_id'; + $stmt = $databox->get_connection()->prepare($sql); + $stmt->execute([':record_id' => $row['record_id']]); + } + + $sqlDelete = 'DELETE FROM technical_datas WHERE id =:id'; + + $stmt1 = $databox->get_connection()->prepare($sqlDelete); + $stmt1->execute([':id' => $row['id']]); + $stmt1->closeCursor(); + } + + $stmt->closeCursor(); + + return true; + } +} diff --git a/package.json b/package.json index b7c814e929..1be5477ff4 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.121-d", + "phraseanet-production-client": "0.34.126-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index 7daa8e64bd..1b8311a2b0 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -1,4 +1,4 @@ - +
@@ -7,8 +7,8 @@
- - + + Form/Login/PhraseaAuthenticationForm.php Form/Configuration/EmailFormType.php @@ -11174,9 +11174,9 @@ Thumbnails prod/actions/printer_default.html.twig - + print_feedback:: Document generated on : - print_feedback:: Document generated on : + Generated on : Out/Module/PDFRecords.php @@ -11189,19 +11189,19 @@ Feedback session closed Out/Module/PDFRecords.php - + print_feedback:: Feedback expiring on : - print_feedback:: Feedback expiring on : + Feedback expiring on : Out/Module/PDFRecords.php - + print_feedback:: Feedback initiated by : - print_feedback:: Feedback initiated by : + Feedback initiated by : Out/Module/PDFRecords.php - + print_feedback:: Feedback initiated on : - print_feedback:: Feedback initiated on : + Feedback initiated on : Out/Module/PDFRecords.php diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 92212e1786..6a49a3caae 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -1,4 +1,4 @@ - +
@@ -7,8 +7,8 @@
- - + + Form/Login/PhraseaAuthenticationForm.php Form/Configuration/EmailFormType.php @@ -11174,9 +11174,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Planche contact prod/actions/printer_default.html.twig
- + print_feedback:: Document generated on : - print_feedback:: Document generated on : + Impression générée le : Out/Module/PDFRecords.php @@ -11189,19 +11189,19 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Validation Fermée Out/Module/PDFRecords.php - + print_feedback:: Feedback expiring on : - print_feedback:: Feedback expiring on : + Expire le : Out/Module/PDFRecords.php - + print_feedback:: Feedback initiated by : - print_feedback:: Feedback initiated by : + Validation envoyée par : Out/Module/PDFRecords.php - + print_feedback:: Feedback initiated on : - print_feedback:: Feedback initiated on : + Début de validation le : Out/Module/PDFRecords.php @@ -11433,9 +11433,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Nom de la validation prod/templates/push.html.twig - + prod::push:push_set_title - Nom du panier de Push + Nom du panier de Push prod/templates/push.html.twig diff --git a/yarn.lock b/yarn.lock index 51fae490f5..632e068075 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7577,11 +7577,10 @@ phraseanet-common@^0.4.5-d: js-cookie "^2.1.0" pym.js "^1.3.1" - -phraseanet-production-client@0.34.121-d: - version "0.34.121-d" - resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.121-d.tgz#38e31900a4ce5958594fcbb56a645497cad51998" - integrity sha512-l1A9OaxxIW70lcQWsD50hShwuanyJ5/GGvby3uhFF4HAEhQj9XPb9i7Nt5xh7L0FU6lLxTumd8V4vWy4R6J6ig== +phraseanet-production-client@0.34.126-d: + version "0.34.126-d" + resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.126-d.tgz#93ca77826eb637bcc089887bc0a2cc43ef3b8c3e" + integrity sha512-x2P5Ckty4iRN6ju/3b43Ljtu0cd8jRdgEQbSGRcaVjd+DuFGgpFqJn5NkoqwSKIXpvutT4sqWTHb0UfZ/sBjPQ== dependencies: "@mapbox/mapbox-gl-language" "^0.9.2" "@turf/turf" "^5.1.6"