Fix php errors at the end of the feed of the carnet.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 1 Jul 2010 11:39:54 +0000 (13:39 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 1 Jul 2010 11:39:54 +0000 (13:39 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/carnet/feed.inc.php

index 01a097f..24ee58a 100644 (file)
@@ -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(),
@@ -48,7 +49,7 @@ class CarnetFeedIterator implements PlIterator
                                  'dead'        => $user->deathdate,
                                  'profile'     => $user->profile()->hrid(),
                                  'user'        => $user,
-                                 'contact'     => $owner->isContact($user));
+                                 'contact'     => $owner->isContact($profile));
             }
         }
         $this->it = PlIteratorUtils::fromArray($infos);