From 8fe7768ef4bdc6d37e56ffa63db7476d3909846a Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 17 Aug 2008 23:27:40 +0200 Subject: [PATCH] Some fixes, use last core. Signed-off-by: Florent Bruneau --- core | 2 +- modules/events.php | 2 +- modules/events/feed.inc.php | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core b/core index 9879250..b0a04fb 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 9879250a1789b2b5819df3a11061ceb7307e3727 +Subproject commit b0a04fb238a94f6ca3cdc874bbc1093915cd0fe2 diff --git a/modules/events.php b/modules/events.php index aff4201..1d63a4b 100644 --- a/modules/events.php +++ b/modules/events.php @@ -235,7 +235,7 @@ class EventsModule extends PLModule { require_once dirname(__FILE__) . '/events/feed.inc.php'; $feed = new EventFeed(); - $feed->run($page, $user, $hash); + return $feed->run($page, $user, $hash); } function handler_preview(&$page) diff --git a/modules/events/feed.inc.php b/modules/events/feed.inc.php index 4e93712..ac3ee0f 100644 --- a/modules/events/feed.inc.php +++ b/modules/events/feed.inc.php @@ -33,17 +33,19 @@ class EventFeed extends PlFeed protected function fetch($user) { + global $globals; return XDB::iterator( 'SELECT e.id, e.titre AS title, e.texte, e.creation_date AS publication, e.post_id, p.attachmime IS NOT NULL AS photo, - CONCAT(u2.prenom, " ", IF(u2.nom_usage = "", u2.nom, u2.nom_usage), "(X", u2.promo, ")") AS author, - FIND_IN_SET(\'wiki\', e.flags) AS wiki + CONCAT(u2.prenom, " ", IF(u2.nom_usage = "", u2.nom, u2.nom_usage), " (X", u2.promo, ")") AS author, + FIND_IN_SET(\'wiki\', e.flags) AS wiki, + CONCAT({?}, "/events#newsid", e.id) AS link FROM auth_user_md5 AS u INNER JOIN evenements AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo) AND (e.promo_max = 0 || e.promo_max >= u.promo) ) LEFT JOIN evenements_photo AS p ON (p.eid = e.id) INNER JOIN auth_user_md5 AS u2 ON (u2.user_id = e.user_id) WHERE u.user_id = {?} AND FIND_IN_SET("valide", e.flags) - AND peremption >= NOW()', $user); + AND peremption >= NOW()', $globals->baseurl, $user); } } -- 2.1.4