diff options
author | Thomas Willingham <founder@kakste.com> | 2012-12-07 22:27:35 +0000 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-12-07 22:27:35 +0000 |
commit | 44263d5ac3e5189df28c92f58c2875137052b6ea (patch) | |
tree | 70aa75426f2b3c984faecdb5f684157bccedda3a /include/Contact.php | |
parent | 555226ada4946b78be5fa2966f5c8532a997953f (diff) | |
parent | 2452b822f909a3cac432a76d8c928733a7683c6a (diff) | |
download | volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.tar.gz volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.tar.bz2 volse-hubzilla-44263d5ac3e5189df28c92f58c2875137052b6ea.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/Contact.php b/include/Contact.php index ff798ed74..e52b5c9cf 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -2,9 +2,22 @@ function vcard_from_xchan($xchan) { + + $connect = false; + if(local_user()) { + $r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", + dbesc($xchan['xchan_hash']), + intval(local_user()) + ); + if(! $r) + $connect = t('Connect'); + } + return replace_macros(get_markup_template('xchan_vcard.tpl'),array( - '$name' => $xchan['xchan_name'], - '$photo' => $xchan['xchan_photo_l'] + '$name' => $xchan['xchan_name'], + '$photo' => $xchan['xchan_photo_l'], + '$url' => $xchan['xchan_addr'], + '$connect' => $connect )); } |