X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fgadgets.php;h=d769a9d8707ac9b2793d5b36ffc5b8512478e1d4;hb=f280f651c1ea4059896655b132ddaec1e39cbd1b;hp=ede101f7ccfec2f8cbace0d0b573b309e3e99d6c;hpb=a6391000e89c59f3c26d1a62bb06857df706bf50;p=platal.git diff --git a/modules/gadgets.php b/modules/gadgets.php index ede101f..d769a9d 100644 --- a/modules/gadgets.php +++ b/modules/gadgets.php @@ -1,6 +1,6 @@ $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), ); } @@ -45,9 +45,9 @@ class GadgetsModule extends PLModule $events = XDB::iterator('SELECT SQL_CALC_FOUND_ROWS 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 = {?}) + ev.user_id IS NULL AS nonlu, e.uid + FROM announces AS e + LEFT JOIN announce_read AS ev ON (e.id = ev.evt_id AND ev.uid = {?}) 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());