aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-06 19:44:13 -0800
committerfriendica <info@friendica.com>2012-12-06 19:44:13 -0800
commit2a7a5b2d0182193c96a12097dd3cf47f517e3553 (patch)
tree0cea565de0d76f4981d4ef141e25a5769ddd3a11 /include
parent8f864ebd193076d88c48c94da61088de930ab1bd (diff)
downloadvolse-hubzilla-2a7a5b2d0182193c96a12097dd3cf47f517e3553.tar.gz
volse-hubzilla-2a7a5b2d0182193c96a12097dd3cf47f517e3553.tar.bz2
volse-hubzilla-2a7a5b2d0182193c96a12097dd3cf47f517e3553.zip
move 'Connect' button to local chanview page, remove from remote profile pages - still requires some theming love
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php17
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
));
}