From c8c9b65b881102e2df34f3c6fec57f825522087e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr>
Date: Tue, 18 Jun 2019 15:28:36 +0200
Subject: [PATCH] =?UTF-8?q?Mise=20ne=20place=20d'un=20script=20provisoire?=
 =?UTF-8?q?=20de=20migration=20pour=20faire=20la=20passerelle=20entre=20le?=
 =?UTF-8?q?s=20versions=20du=20syst=C3=A8me=20de=20mise=20=C3=A0=20jour...?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 admin/actions/migration.php |  4 ++++
 admin/src/OseAdmin.php      |  2 +-
 code/test1.php              | 19 -------------------
 3 files changed, 5 insertions(+), 20 deletions(-)
 create mode 100644 admin/actions/migration.php

diff --git a/admin/actions/migration.php b/admin/actions/migration.php
new file mode 100644
index 0000000000..65a28f788d
--- /dev/null
+++ b/admin/actions/migration.php
@@ -0,0 +1,4 @@
+<?php
+
+// Script provisoire : il aura disparu à la prochaine version!!!
+$oa->run('update-bdd');
\ No newline at end of file
diff --git a/admin/src/OseAdmin.php b/admin/src/OseAdmin.php
index ca0d621ee6..aa2af572be 100644
--- a/admin/src/OseAdmin.php
+++ b/admin/src/OseAdmin.php
@@ -176,7 +176,7 @@ class OseAdmin
      * @throws \BddAdmin\Exception\BddException
      * @throws \BddAdmin\Exception\BddIndexExistsException
      */
-    public function migration(string $prePost = 'pre'): boolean
+    public function migration(string $prePost = 'pre'): bool
     {
         $tags = $this->getTags(1);
         foreach ($tags as $i => $tag) {
diff --git a/code/test1.php b/code/test1.php
index 63fb40792c..8443aef099 100755
--- a/code/test1.php
+++ b/code/test1.php
@@ -6,22 +6,3 @@
  * @var $viewName   string
  * @var $sl         \Zend\ServiceManager\ServiceLocatorInterface
  */
-
-$tags = [
-    '7.0',
-    '7.1 BETA 5',
-    '7.1',
-    '7.2 ALPHA',
-    '8.0beta',
-];
-foreach ( $tags as $i => $tag ){
-    $tag = strtolower($tag);
-    if (false !== ($p = strpos($tag,'alpha'))){
-        $tags[$i] = trim(substr($tag, 0, $p));
-    }
-    if (false !== ($p = strpos($tag,'beta'))){
-        $tags[$i] = trim(substr($tag, 0, $p));
-    }
-}
-$tags = array_unique($tags);
-var_dump($tags);
\ No newline at end of file
-- 
GitLab