X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fcarnet%2Ffeed.inc.php;h=9472250567452dcc8fa2d7e066d9d171c580c73e;hb=ff64abfdbc00bcfb5ccaae3b53c0b1ab7a5c54f5;hp=8f5a8e155b46ca8badb65f48e2095aa058b3296b;hpb=c350577bb79078fabcb4818f4ffa31022d34ccb7;p=platal.git diff --git a/modules/carnet/feed.inc.php b/modules/carnet/feed.inc.php index 8f5a8e1..9472250 100644 --- a/modules/carnet/feed.inc.php +++ b/modules/carnet/feed.inc.php @@ -1,6 +1,6 @@ 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(), + 'title' => '[' . $op->getTitle(1) . '] - ' . $user->fullName() . ' le ' . $datetext, 'author' => $user->fullName(), - 'publication' => strtotime($op->publicationDate($user)), + 'publication' => $op->publicationDate($user), 'date' => strtotime($date), - 'id' => $op->flag . strtotime($date), + 'id' => $op->flag . '-' . $user->id() . '-' . strtotime($date), 'data' => $op->getData($user), '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); @@ -85,7 +90,7 @@ class CarnetFeed extends PlFeed 'carnet/rss.tpl'); } - protected function fetch(PlUser &$user) + protected function fetch(PlUser $user) { return new CarnetFeedIterator($user); }