Typo
[platal.git] / modules / xnetevents / xnetevents.inc.php
index 48c0961..8886f37 100644 (file)
@@ -37,8 +37,8 @@ function get_event_detail($eid, $item_id = false, $asso_id = null)
                          FROM  group_events              AS e
                    INNER JOIN  group_event_items        AS ei ON (e.eid = ei.eid)
                     LEFT JOIN  group_event_participants AS ep ON(e.eid = ep.eid AND ei.item_id = ep.item_id)
-                    LEFT JOIN  #x4dat#.virtual AS al ON(al.type = \'evt\' AND al.alias = CONCAT(short_name, {?}))
-                    LEFT JOIN  #x4dat#.virtual AS pl ON(pl.type = \'evt\' AND pl.alias = CONCAT(short_name, {?}))
+                    LEFT JOIN  virtual AS al ON(al.type = \'evt\' AND al.alias = CONCAT(short_name, {?}))
+                    LEFT JOIN  virtual AS pl ON(pl.type = \'evt\' AND pl.alias = CONCAT(short_name, {?}))
                         WHERE  (e.eid = {?} OR e.short_name = {?}) AND ei.item_id = {?} AND e.asso_id = {?}
                      GROUP BY  ei.item_id',
                    '-absents@'.$globals->xnet->evts_domain,
@@ -120,7 +120,7 @@ function get_event_participants(&$evt, $item_id, array $tri = array(), $count =
                                           FROM  group_event_participants AS ep
                                          WHERE  ep.eid = {?} AND nb > 0 ' . $append . '
                                       GROUP BY  ep.uid', $eid);
-    $uf = new UserFilter(new UFC_True(), $tri);
+    $uf = new UserFilter(new PFC_True(), $tri);
     $users = User::getBulkUsersWithUIDs($uf->filter(array_keys($query), $count, $offset));
     $tab = array();
     foreach ($users as $user) {
@@ -248,7 +248,7 @@ function event_change_shortname(&$page, $eid, $old, $new)
                     et qu'il ne contient que des lettres non accentuées,
                     des chiffres ou les caractères - et .");
         return $old;
-    } elseif ($new && ctype_digit($new)) {
+    } elseif ($new && (is_int($new) || ctype_digit($new))) {
         $page->trigError("Le raccourci demandé ne peut être accepté car il
                          ne contient que des chiffres. Rajoute-lui par exemple
                          une lettre.");
@@ -304,8 +304,8 @@ function event_change_shortname(&$page, $eid, $old, $new)
             XDB::execute("INSERT IGNORE INTO  virtual_redirect (
                                       SELECT  {?} AS vid, IF(al.alias IS NULL, a.email, CONCAT(al.alias, {?})) AS redirect
                                         FROM  group_event_participants AS ep
-                                   LEFT JOIN  #x4dat#.accounts AS a  ON (ep.uid = a.uid)
-                                   LEFT JOIN  #x4dat#.aliases  AS al ON (al.id = a.uid AND al.type = 'a_vie')
+                                   LEFT JOIN  accounts AS a  ON (ep.uid = a.uid)
+                                   LEFT JOIN  aliases  AS al ON (al.uid = a.uid AND al.type = 'a_vie')
                                        WHERE  ep.eid = {?} AND " . $where[$v] . "
                                     GROUP BY  ep.uid)",
                          $lastid[$v], '@' . $globals->mail->domain, $eid);
@@ -313,8 +313,8 @@ function event_change_shortname(&$page, $eid, $old, $new)
         XDB::execute("INSERT IGNORE INTO  virtual_redirect (
                                   SELECT  {?} AS vid, IF(al.alias IS NULL, a.email, CONCAT(al.alias, {?})) AS redirect
                                     FROM  group_members AS m
-                               LEFT JOIN  #x4dat#.accounts  AS a  ON (a.uid = m.uid)
-                               LEFT JOIN  #x4dat#.aliases   AS al ON (al.id = a.uid AND al.type = 'a_vie')
+                               LEFT JOIN  accounts  AS a  ON (a.uid = m.uid)
+                               LEFT JOIN  aliases   AS al ON (al.uid = a.uid AND al.type = 'a_vie')
                                LEFT JOIN  group_event_participants AS ep ON (ep.uid = m.uid AND ep.eid = {?})
                                    WHERE  m.asso_id = {?} AND ep.uid IS NULL
                                 GROUP BY  m.uid)",