diff --git a/www/admin/index.php b/www/admin/index.php index 1e999df..3791e44 100644 --- a/www/admin/index.php +++ b/www/admin/index.php @@ -23,9 +23,11 @@ foreach ($plugin->getConfig('reduction') as $taux) // idem avec les champs nom/prénom $nbChamps = 0; -if (null !== $plugin->getConfig('champsNom')) +$champsNom = Utils::getChampsNom($config, $plugin); + +if (null !== $champsNom) { - foreach ($plugin->getConfig('champsNom') as $nom => $champ) + foreach ($champsNom as $nom => $champ) { if ($champ->position != 0) { ++$nbChamps; } } diff --git a/www/admin/versements_activites.php b/www/admin/versements_activites.php index d4a66b8..0c44d40 100644 --- a/www/admin/versements_activites.php +++ b/www/admin/versements_activites.php @@ -14,7 +14,7 @@ if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { } // champs pour le nom et prénom -$confNoms = (array) $plugin->getConfig('champsNom'); +$confNoms = Utils::getChampsNom($config, $plugin); uasort($confNoms, function ($a, $b) { return $a->position - $b->position; diff --git a/www/admin/versements_personnes.php b/www/admin/versements_personnes.php index 258a93b..aa3612f 100644 --- a/www/admin/versements_personnes.php +++ b/www/admin/versements_personnes.php @@ -13,7 +13,7 @@ if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { $_SESSION['taux_reduction'] = $_POST['taux_reduction']; // champs pour le nom et prénom -$confNoms = (array) $plugin->getConfig('champsNom'); +$confNoms = Utils::getChampsNom($config, $plugin); uasort($confNoms, function ($a, $b) { return $a->position - $b->position;