From 3f63a693b17a1b11b5723c8f500e1e7e10ba6b60 Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Sat, 3 Jan 2009 14:33:57 +0100 Subject: [PATCH] Fixes plat/al's feeds. Feed handlers were using an User object as a numerical id. Signed-off-by: Vincent Zanotti --- core | 2 +- modules/carnet/feed.inc.php | 4 ++-- modules/events/feed.inc.php | 4 ++-- modules/xnetgrp/feed.inc.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core b/core index a12a0ce..adc69ce 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit a12a0ce3c524c4edabcbb0e872fbc84fc3bad498 +Subproject commit adc69ced9c75421c5ee596fbd0a3426fffb9940c diff --git a/modules/carnet/feed.inc.php b/modules/carnet/feed.inc.php index fad227c..362f23a 100644 --- a/modules/carnet/feed.inc.php +++ b/modules/carnet/feed.inc.php @@ -84,9 +84,9 @@ class CarnetFeed extends PlFeed 'carnet/rss.tpl'); } - protected function fetch($user) + protected function fetch(PlUser &$user) { - return new CarnetFeedIterator(new Notifs($user, false)); + return new CarnetFeedIterator(new Notifs($user->id(), false)); } } diff --git a/modules/events/feed.inc.php b/modules/events/feed.inc.php index ac3ee0f..3647cc5 100644 --- a/modules/events/feed.inc.php +++ b/modules/events/feed.inc.php @@ -31,7 +31,7 @@ class EventFeed extends PlFeed 'events/rss.tpl'); } - protected function fetch($user) + protected function fetch(PlUser &$user) { global $globals; return XDB::iterator( @@ -45,7 +45,7 @@ class EventFeed extends PlFeed 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()', $globals->baseurl, $user); + AND peremption >= NOW()', $globals->baseurl, $user->id()); } } diff --git a/modules/xnetgrp/feed.inc.php b/modules/xnetgrp/feed.inc.php index caee580..9d5c15b 100644 --- a/modules/xnetgrp/feed.inc.php +++ b/modules/xnetgrp/feed.inc.php @@ -33,7 +33,7 @@ class XnetGrpEventFeed extends PlFeed 'xnetgrp/announce-rss.tpl'); } - protected function fetch($user) + protected function fetch(PlUser &$user) { global $globals; if (!is_null($user)) { @@ -47,7 +47,7 @@ class XnetGrpEventFeed extends PlFeed AND (a.promo_max = 0 OR a.promo_max <= u.promo)) INNER JOIN auth_user_md5 AS u2 ON (u2.user_id = a.user_id) WHERE u.user_id = {?} AND peremption >= NOW() AND a.asso_id = {?}", - $this->link, $user, $globals->asso('id')); + $this->link, $user->id(), $globals->asso('id')); } else { return XDB::iterator("SELECT a.id, a.titre AS title, a.texte, a.create_date AS publication, CONCAT(u.prenom, ' ', IF(u.nom_usage != '', u.nom_usage, u.nom), ' (X', u.promo, ')') AS author, -- 2.1.4