From: Raphaël Barrois Date: Mon, 15 Feb 2010 14:08:03 +0000 (+0100) Subject: Use ProfileFilter for vcard building X-Git-Tag: xorg/1.0.0~332^2~213 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f40e4ce5c62576967d1aa7c43ed626681c870ade;p=platal.git Use ProfileFilter for vcard building Signed-off-by: Raphaël Barrois --- diff --git a/modules/carnet.php b/modules/carnet.php index ac3c0fe..0c8f790 100644 --- a/modules/carnet.php +++ b/modules/carnet.php @@ -383,11 +383,9 @@ class CarnetModule extends PLModule function handler_vcard(&$page, $photos = null) { - $res = XDB::query('SELECT contact - FROM contacts - WHERE uid = {?}', S::v('uid')); + $pf = new ProfileFilter(new UFC_Contact(S::user())); $vcard = new VCard($photos == 'photos'); - $vcard->addUsers($res->fetchColumn()); + $vcard->addProfiles($pf->getProfiles()); $vcard->show(); } }