Overview
Comment:Modernisation page "mes cotisations"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: e8680f70ea5a48ebd0e590401d8e498f6c9dc572
User & Date: bohwaz on 2017-05-17 06:35:32
Other Links: branch diff | manifest | tags
Context
2017-05-17
07:07
Ajout m├ęthode openBlob check-in: 2b37df9aad user: bohwaz tags: dev
06:35
Modernisation page "mes cotisations" check-in: e8680f70ea user: bohwaz tags: dev
2017-05-16
06:11
Modernisation page mes_infos_securite check-in: c2c740f554 user: bohwaz tags: dev
Changes

Modified src/www/admin/mes_cotisations.php from [df647d0b00] to [8944c5b1e8].

     1      1   <?php
     2      2   namespace Garradin;
     3      3   
     4      4   require_once __DIR__ . '/_inc.php';
     5      5   
     6         -$membre = $membres->getLoggedUser();
     7         -
     8         -if (!$membre)
     9         -{
    10         -    throw new UserException("Ce membre n'existe pas.");
    11         -}
    12         -
    13         -$error = false;
    14         -
    15         -$tpl->assign('membre', $membre);
            6  +$tpl->assign('membre', $user);
    16      7   
    17      8   $cats = new Membres\Categories;
    18      9   
    19         -$categorie = $cats->get($membre['id_categorie']);
           10  +$categorie = $cats->get($user->id_categorie);
    20     11   $tpl->assign('categorie', $categorie);
    21     12   
    22     13   $cotisations = new Membres\Cotisations;
    23     14   
    24         -if (!empty($categorie['id_cotisation_obligatoire']))
           15  +if (!empty($categorie->id_cotisation_obligatoire))
    25     16   {
    26         -    $tpl->assign('cotisation', $cotisations->isMemberUpToDate($membre['id'], $categorie['id_cotisation_obligatoire']));
           17  +    $tpl->assign('cotisation', $cotisations->isMemberUpToDate($user->id, $categorie->id_cotisation_obligatoire));
    27     18   }
    28     19   else
    29     20   {
    30     21       $tpl->assign('cotisation', false);
    31     22   }
    32     23   
    33         -$tpl->assign('nb_activites', $cotisations->countForMember($membre['id']));
    34         -$tpl->assign('cotisations', $cotisations->listForMember($membre['id']));
    35         -$tpl->assign('cotisations_membre', $cotisations->listSubscriptionsForMember($membre['id']));
           24  +$tpl->assign('nb_activites', $cotisations->countForMember($user->id));
           25  +$tpl->assign('cotisations', $cotisations->listForMember($user->id));
           26  +$tpl->assign('cotisations_membre', $cotisations->listSubscriptionsForMember($user->id));
    36     27   
    37     28   $tpl->display('admin/mes_cotisations.tpl');