diff --git a/www/admin/config.php b/www/admin/config.php index 43c7d7e..e773b51 100644 --- a/www/admin/config.php +++ b/www/admin/config.php @@ -3,7 +3,7 @@ namespace Garradin; $session->requireAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN); -$art_sel=f('articlesCGI'); +$art_sel=f('articlesCGI') ? : []; error_log("art sel=" . print_r($art_sel, true) . "\n"); if (f('save') && $form->check('recusfiscaux_config')) { diff --git a/www/admin/versements_activites.php b/www/admin/versements_activites.php index 4dcc5db..c844b87 100644 --- a/www/admin/versements_activites.php +++ b/www/admin/versements_activites.php @@ -4,9 +4,14 @@ namespace Garradin; use Garradin\Plugin\RecusFiscaux\Utils; -// récupérer les infos du formulaire -$lesTarifs = f('tarifs'); +// vérifier si l'année a bien été sélectionnée au préalable $_SESSION['annee_recu'] = f('annee_recu'); +// error_log("va.php::annee_recu = (" .$_SESSION['annee_recu'] . ")"); +if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { + \Garradin\Utils::redirect(PLUGIN_URL . 'index.php'); +} +// récupérer les infos du formulaire +$lesTarifs = f('tarifs') ?: []; // taux de réduction associés $lesTaux = array(); diff --git a/www/admin/versements_personnes.php b/www/admin/versements_personnes.php index adabb18..9f16a61 100644 --- a/www/admin/versements_personnes.php +++ b/www/admin/versements_personnes.php @@ -4,8 +4,13 @@ namespace Garradin; use Garradin\Plugin\RecusFiscaux\Utils; -// liste des versements totaux par personne +// vérifier si l'année a bien été sélectionnée au préalable $_SESSION['annee_recu'] = f('annee_recu'); +// error_log("vp.php::annee_recu = (" .$_SESSION['annee_recu'] . ")"); +if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { + \Garradin\Utils::redirect(PLUGIN_URL . 'index.php'); +} +// liste des versements totaux par personne $_SESSION['lesVersementsTotaux'] = Utils::getVersementsTotaux($_SESSION['annee_recu']); // préparation de l'affichage