Update banana (Fix #797).
[platal.git] / modules / events / feed.inc.php
index afa6396..63ced8d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -31,7 +31,7 @@ class EventFeed extends PlFeed
                             'events/rss.tpl');
     }
 
-    public static function nextEvent(PlIterator &$it, PlUser &$user)
+    public static function nextEvent(PlIterator $it, PlUser $user)
     {
         while ($body = $it->next()) {
             $uf = UserFilter::getLegacy($body['promo_min'], $body['promo_max']);
@@ -42,7 +42,7 @@ class EventFeed extends PlFeed
         return null;
     }
 
-    protected function fetch(PlUser &$user)
+    protected function fetch(PlUser $user)
     {
         global $globals;
         $events = XDB::iterator('SELECT  e.id, e.titre AS title, e.texte, e.creation_date AS publication, e.post_id,
@@ -53,7 +53,7 @@ class EventFeed extends PlFeed
                                   WHERE  FIND_IN_SET("valide", e.flags) AND expiration >= NOW()');
         $data = array();
         while ($e = self::nextEvent($events, $user)) {
-            $author = User::getWithUID($e['user_id']);
+            $author = User::getWithUID($e['uid']);
             $promo  = $author->promo();
             $e['author'] = $author->fullName() . ($promo ? ' (' . $promo . ')' : '');
             $e['link'] = $globals->baseurl . '/events#newsid' . $e['id'];