From 2ec25d62c74e5589620b2a2c89d5dbb041147d55 Mon Sep 17 00:00:00 2001 From: Brice Gelineau Date: Sun, 27 Nov 2011 08:55:57 +0100 Subject: [PATCH] Fixes deletion of people inscriptions in events (Closes #1578) Signed-off-by: Brice Gelineau --- ChangeLog | 1 + modules/xnetevents.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 886db4c..963fde8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Bug/Wish: * XnetEvent: - #1577: Fixes alternative payements given by admins -GLN + - #1578: Fixes deletion of people inscriptions -GLN From 1.1.4 branch: diff --git a/modules/xnetevents.php b/modules/xnetevents.php index f4c04ec..92f8e31 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -603,7 +603,7 @@ class XnetEventsModule extends PLModule // 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']); @@ -625,7 +625,7 @@ class XnetEventsModule extends PLModule 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']); -- 2.1.4