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/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