From 3eb0cc5f1692503b36b9eb4c737d42d9e42d97a5 Mon Sep 17 00:00:00 2001 From: oversu <95a7002b-481b-4ef3-b578-f9c421550aa4@localhost> Date: Thu, 3 Sep 2026 22:47:00 +0200 Subject: [PATCH] =?UTF-8?q?S=C3=A9curiser=20la=20mise=20=C3=A0=20niveau=20?= =?UTF-8?q?depuis=20PHP=208.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.toml | 2 +- scripts/upgrade | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 52b7a55..6043e37 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ id = "globinours" name = "Globinours" description.en = "Lightweight animal shelter management" description.fr = "Gestion légère et complète pour refuges animaliers" -version = "1.0.0-rc.3~ynh3" +version = "1.0.0-rc.3~ynh4" maintainers = ["OverSu"] [upstream] diff --git a/scripts/upgrade b/scripts/upgrade index 340c476..3e669d1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,10 @@ #!/bin/bash source _common.sh -if [[ -f "$install_dir/scripts/backup.php" && -f "$data_dir/refuge.sqlite" ]]; then +if [[ -f "$install_dir/scripts/backup.php" && -f "$data_dir/refuge.sqlite" ]] && \ + php -l "$install_dir/app/Services/BackupService.php" >/dev/null 2>&1; then ynh_exec_as_app php "$install_dir/scripts/backup.php" pre-upgrade-yunohost +elif [[ -f "$data_dir/refuge.sqlite" ]]; then + ynh_print_warn --message="La sauvegarde applicative préalable est ignorée car l'ancienne version n'est pas compatible avec PHP $php_version. La sauvegarde de sécurité YunoHost reste active." fi touch "$data_dir/storage/maintenance.flag" trap 'rm -f "$data_dir/storage/maintenance.flag"' EXIT