X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetevents%2Fxnetevents.inc.php;h=214e1a7fc57bb0c9e1cb8fa8e586a704f8822bd2;hb=22f0a0a857bc6ba3fedb543f580af5bc7a45ab42;hp=b1822da5f75974915ab3b5eb2b5360a37968acbe;hpb=730a173a333507926e0029d8a96c3a26b55756e4;p=platal.git diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index b1822da..214e1a7 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -202,7 +202,8 @@ function get_event_participants(&$evt, $item_id, $tri, $limit = '') { function subscribe_lists_event($participate, $uid, $evt) { require_once('user.func.inc.php'); - global $globals,$page; + global $globals; + $page =& Platal::page(); $participant_list = $evt['participant_list']; $absent_list = $evt['absent_list']; @@ -215,7 +216,7 @@ function subscribe_lists_event($participate, $uid, $evt) $res = XDB::query("SELECT email FROM groupex.membres WHERE uid = {?} AND asso_id = {?}", - S::v('uid'), $globals->asso('id')); + $uid, $globals->asso('id')); $email = $res->fetchOneCell(); } @@ -259,7 +260,7 @@ function event_change_shortname(&$page, $eid, $old, $new) } // Quelques vérifications sur l'alias (caractères spéciaux) if ($new && !preg_match( "/^[a-zA-Z0-9\-.]{3,20}$/", $new)) { - $page->trig("Le raccourci demandé n'est pas valide. + $page->trigError("Le raccourci demandé n'est pas valide. Vérifie qu'il comporte entre 3 et 20 caractères et qu'il ne contient que des lettres non accentuées, des chiffres ou les caractères - et ."); @@ -273,7 +274,7 @@ function event_change_shortname(&$page, $eid, $old, $new) WHERE short_name = {?}', $new); if ($res->fetchOneCell() > 0) { - $page->trig("Le raccourci demandé est déjà utilisé. Choisis en un autre."); + $page->trigError("Le raccourci demandé est déjà utilisé. Choisis en un autre."); return $old; } } @@ -301,7 +302,7 @@ function event_change_shortname(&$page, $eid, $old, $new) $lastid = XDB::insertId(); XDB::execute( - "INSERT INTO virtual_redirect ( + "INSERT IGNORE INTO virtual_redirect ( SELECT {?} AS vid, IF(u.nom IS NULL, m.email, CONCAT(a.alias, {?})) AS redirect FROM groupex.evenements_participants AS ep LEFT JOIN groupex.membres AS m ON (ep.uid = m.uid)