Fixes plat/al's feeds. Feed handlers were using an User object as a numerical id.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 3 Jan 2009 13:33:57 +0000 (14:33 +0100)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 3 Jan 2009 13:33:57 +0000 (14:33 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
core
modules/carnet/feed.inc.php
modules/events/feed.inc.php
modules/xnetgrp/feed.inc.php

diff --git a/core b/core
index a12a0ce..adc69ce 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit a12a0ce3c524c4edabcbb0e872fbc84fc3bad498
+Subproject commit adc69ced9c75421c5ee596fbd0a3426fffb9940c
index fad227c..362f23a 100644 (file)
@@ -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));
     }
 }
 
index ac3ee0f..3647cc5 100644 (file)
@@ -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());
     }
 }
 
index caee580..9d5c15b 100644 (file)
@@ -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,