Prevent sending empty issues (Closes #1587).
[platal.git] / modules / carnet / feed.inc.php
index 24ee58a..0351dc7 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   *
@@ -27,7 +27,7 @@ class CarnetFeedIterator implements PlIterator
     private $notifs;
     private $it;
 
-    public function __construct(PlUser &$owner)
+    public function __construct(PlUser $owner)
     {
         $notifs = Watch::getEvents($owner);
         $infos  = array();
@@ -48,6 +48,7 @@ class CarnetFeedIterator implements PlIterator
                                  'hruid'       => $user->login(),
                                  'dead'        => $user->deathdate,
                                  'profile'     => $user->profile()->hrid(),
+                                 'link'        => Platal::globals()->baseurl . '/profile/' . $profile->hrid(),
                                  'user'        => $user,
                                  'contact'     => $owner->isContact($profile));
             }
@@ -89,7 +90,7 @@ class CarnetFeed extends PlFeed
                             'carnet/rss.tpl');
     }
 
-    protected function fetch(PlUser &$user)
+    protected function fetch(PlUser $user)
     {
         return new CarnetFeedIterator($user);
     }