ajout mise à jour configuration

FossilOrigin-Name: 56439aa7656d7e3deaf5c8136317085459aa7c712b608b107c21ae2c868e3462
This commit is contained in:
engel 2023-02-06 13:10:00 +00:00
parent 086dbaec18
commit d7f78743c8
2 changed files with 22 additions and 0 deletions

17
upgrade.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Garradin;
use Garradin\Entities\Files\File;
if (version_compare($old_version, '0.9', '<'))
{
$configNum = new \stdClass();
$configNum->prefixe = "";
$configNum->annee = false;
$configNum->membre = false;
$configNum->sequentiel = false;
$configNum->valeur_init = 1;
$plugin->setConfig('numerotation', $configNum);
$plugin->setConfig('imprimerCourriel', false);
}

View File

@ -4,6 +4,11 @@ namespace Garradin;
use Garradin\Plugin\RecusFiscaux\Utils;
// mettre à jour le plugin si besoin
if ($plugin->needUpgrade()) {
$plugin->upgrade();
}
// Année fiscale par défaut
if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "")
{