X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetevents.php;h=f35b2f88b3931f0dd804adeeb5cf553ea53c77bc;hb=8c5c6d646a25e0d90a00ea798d18e535533c4814;hp=269f5a2b5baf5559a0f7504a6d9d647701546390;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/modules/xnetevents.php b/modules/xnetevents.php index 269f5a2..f35b2f8 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -30,7 +30,7 @@ class XnetEventsModule extends PLModule '%grp/events/sub' => $this->make_hook('sub', AUTH_MDP), '%grp/events/csv' => $this->make_hook('csv', AUTH_MDP), '%grp/events/ical' => $this->make_hook('ical', AUTH_MDP), - '%grp/events/edit' => $this->make_hook('edit', AUTH_MDP), + '%grp/events/edit' => $this->make_hook('edit', AUTH_MDP, 'groupadmin'), '%grp/events/admin' => $this->make_hook('admin', AUTH_MDP), ); } @@ -266,7 +266,7 @@ class XnetEventsModule extends PLModule return PL_NOT_FOUND; } - header('Content-type: text/x-csv; encoding=iso-8859-1'); + header('Content-type: text/x-csv; encoding=UTF-8'); header('Pragma: '); header('Cache-Control: '); @@ -433,13 +433,19 @@ class XnetEventsModule extends PLModule Post::v('site'), $money_defaut, Post::v('confirmation'), 0, 999, $globals->asso('id'), $eid); - $p->submit(); + if ($p->accept()) { + $p->submit(); + } else { + $page->assign('paiement_message', Post::v('confirmation')); + $page->assign('paiement_site', Post::v('site')); + $error = true; + } } // events with no sub-event: add a sub-event with no name if ($nb_moments == 0) { XDB::execute("INSERT INTO groupex.evenements_items - VALUES ({?}, {?}, '', '', 0)", $eid, 1); + VALUES ({?}, {?}, '', '', 0)", $eid, 1); } if (!$error) {