Merge branch 'platal-1.0.0'
[platal.git] / modules / carnet / feed.inc.php
index 2f1a926..ea4f52c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -37,6 +37,7 @@ class CarnetFeedIterator implements PlIterator
                 $date = $op->getDate($user);
                 @$datetext = new Date($date);
                 @$datetext = $datetext->format('%e %B %Y');
+                $profile = $user->profile();
                 $infos[] = array('operation'   => $op,
                                  'title'       => '[' . $op->getTitle(1) . ']  - ' . $user->fullName() . ' le ' . $datetext,
                                  'author'      => $user->fullName(),
@@ -47,8 +48,9 @@ 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($user));
+                                 'contact'     => $owner->isContact($profile));
             }
         }
         $this->it = PlIteratorUtils::fromArray($infos);