X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetevents.php;h=6e4c418a1595206a751a0f0e66fb5ae6e4ad09ee;hb=ae163e7a83670527fcc67e38b5bbc0902b7fe119;hp=d5091c972628df93c142c3a9a61c0c14703434ed;hpb=843a2191e4c76f0beb00c754f06974de76791238;p=platal.git diff --git a/modules/xnetevents.php b/modules/xnetevents.php index d5091c9..6e4c418 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -94,7 +94,6 @@ class XnetEventsModule extends PLModule $eid, $globals->asso('id')); // delete the requests for payments - require_once 'validations.inc.php'; XDB::execute("DELETE FROM requests WHERE type = 'paiements' AND data LIKE {?}", PayReq::same_event($eid, $globals->asso('id'))); @@ -394,12 +393,12 @@ class XnetEventsModule extends PLModule ); $trivial = array('intitule', 'descriptif', 'noinvite', - 'show_participants', 'accept_nonmembre', 'organisateur_uid'); + 'show_participants', 'accept_nonmembre', 'uid'); foreach ($trivial as $k) { $evt[$k] = Post::v($k); } if (!$eid) { - $evt['organisateur_uid'] = S::v('uid'); + $evt['uid'] = S::v('uid'); } if (Post::v('deadline')) { @@ -411,17 +410,17 @@ class XnetEventsModule extends PLModule } // Store the modifications in the database - XDB::execute('REPLACE INTO group_events - SET eid={?}, asso_id={?}, organisateur_uid={?}, intitule={?}, - paiement_id = {?}, descriptif = {?}, debut = {?}, - fin = {?}, show_participants = {?}, short_name = {?}, - deadline_inscription = {?}, noinvite = {?}, - accept_nonmembre = {?}', - $evt['eid'], $evt['asso_id'], $evt['organisateur_uid'], - $evt['intitule'], $evt['paiement_id'], $evt['descriptif'], - $evt['debut'], $evt['fin'], $evt['show_participants'], - $evt['short_name'], $evt['deadline_inscription'], - $evt['noinvite'], $evt['accept_nonmembre']); + XDB::execute('REPLACE INTO group_events + SET eid = {?}, asso_id = {?}, uid = {?}, intitule = {?}, + paiement_id = {?}, descriptif = {?}, debut = {?}, + fin = {?}, show_participants = {?}, short_name = {?}, + deadline_inscription = {?}, noinvite = {?}, + accept_nonmembre = {?}', + $evt['eid'], $evt['asso_id'], $evt['uid'], + $evt['intitule'], $evt['paiement_id'], $evt['descriptif'], + $evt['debut'], $evt['fin'], $evt['show_participants'], + $evt['short_name'], $evt['deadline_inscription'], + $evt['noinvite'], $evt['accept_nonmembre']); // if new event, get its id if (!$eid) { @@ -449,7 +448,6 @@ class XnetEventsModule extends PLModule } // request for a new payment if (Post::v('paiement_id') == -1 && $money_defaut >= 0) { - require_once 'validations.inc.php'; $p = new PayReq(S::user(), Post::v('intitule')." - ".$globals->asso('nom'), Post::v('site'), $money_defaut, @@ -487,14 +485,13 @@ class XnetEventsModule extends PLModule // when modifying an old event retreive the old datas if ($eid) { $res = XDB::query( - "SELECT eid, intitule, descriptif, debut, fin, organisateur_uid, + "SELECT eid, intitule, descriptif, debut, fin, uid, show_participants, paiement_id, short_name, deadline_inscription, noinvite, accept_nonmembre FROM group_events WHERE eid = {?}", $eid); $evt = $res->fetchOneAssoc(); // find out if there is already a request for a payment for this event - require_once 'validations.inc.php'; $res = XDB::query("SELECT stamp FROM requests WHERE type = 'paiements' AND data LIKE {?}", @@ -585,7 +582,6 @@ class XnetEventsModule extends PLModule $u = 0; subscribe_lists_event($member->uid, $evt, -1, $paid); } else { - var_dump($u); $u = $u['cnt'] ? $u['nb'] : null; subscribe_lists_event($member->uid, $evt, ($u > 0 ? 1 : 0), $paid); }