Signed-off-by: Brice Gelineau <brice.gelineau@polytechnique.org>
* XnetEvent:
- #1577: Fixes alternative payements given by admins -GLN
* XnetEvent:
- #1577: Fixes alternative payements given by admins -GLN
+ - #1578: Fixes deletion of people inscriptions -GLN
// change the number of personns coming with a participant
if (Env::v('adm') == 'nbs' && $member) {
// change the number of personns coming with a participant
if (Env::v('adm') == 'nbs' && $member) {
- $res = XDB::query("SELECT paid
+ $res = XDB::query("SELECT SUM(paid)
FROM group_event_participants
WHERE uid = {?} AND eid = {?}",
$member->uid, $evt['eid']);
FROM group_event_participants
WHERE uid = {?} AND eid = {?}",
$member->uid, $evt['eid']);
GROUP BY uid',
$member->uid, $evt['eid']);
$u = $res->fetchOneAssoc();
GROUP BY uid',
$member->uid, $evt['eid']);
$u = $res->fetchOneAssoc();
- if ($u['cnt'] == 1 && $paid == 0 && Post::v('cancel')) {
+ if ($paid == 0 && Post::v('cancel')) {
XDB::execute("DELETE FROM group_event_participants
WHERE uid = {?} AND eid = {?}",
$member->uid, $evt['eid']);
XDB::execute("DELETE FROM group_event_participants
WHERE uid = {?} AND eid = {?}",
$member->uid, $evt['eid']);