Fix remaining #x4dat#s.
[platal.git] / modules / gadgets.php
index ede101f..40651cd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -25,9 +25,9 @@ class GadgetsModule extends PLModule
     {
         return array(
             'gadgets/ig-events.xml' => $this->make_hook('ig_events_xml', AUTH_PUBLIC, 'user', NO_HTTPS),
-            'gadgets/ig-events'     => $this->make_hook('ig_events', AUTH_PUBLIC),
+            'gadgets/ig-events'     => $this->make_hook('ig_events',     AUTH_PUBLIC),
             'gadgets/ig-search.xml' => $this->make_hook('ig_search_xml', AUTH_PUBLIC, 'user', NO_HTTPS),
-            'gadgets/ig-search'     => $this->make_hook('ig_search', AUTH_PUBLIC),
+            'gadgets/ig-search'     => $this->make_hook('ig_search',     AUTH_PUBLIC),
         );
     }
 
@@ -46,8 +46,8 @@ class GadgetsModule extends PLModule
                                          e.id, e.titre, UNIX_TIMESTAMP(e.creation_date) AS creation_date,
                                          IF(u.nom_usage = "", u.nom, u.nom_usage) AS nom, u.prenom, u.promo,
                                          ev.user_id IS NULL AS nonlu, e.user_id
-                                   FROM  evenements AS e
-                              LEFT JOIN  evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
+                                   FROM  announces AS e
+                              LEFT JOIN  announce_read AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
                                   WHERE  FIND_IN_SET("valide", e.flags) AND peremption >= NOW()
                                ORDER BY  e.creation_date DESC', S::i('uid'));
         $page->assign('event_count', XDB::query("SELECT FOUND_ROWS()")->fetchOneCell());