aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-13 13:30:33 -0800
committerfriendica <info@friendica.com>2013-12-13 13:30:33 -0800
commit0215043826c2c036c3a2c88fa6e42089138c7c52 (patch)
treecb0eb5f53befcef093b19b49387c5cc7e7fa8e1e /include/Contact.php
parent94975f8d3081051df48b6fdd73be3f4be5484cf6 (diff)
downloadvolse-hubzilla-0215043826c2c036c3a2c88fa6e42089138c7c52.tar.gz
volse-hubzilla-0215043826c2c036c3a2c88fa6e42089138c7c52.tar.bz2
volse-hubzilla-0215043826c2c036c3a2c88fa6e42089138c7c52.zip
prepare for Comanchification of mod_photos
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 5725e06f0..20dd04d17 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -77,6 +77,19 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
$a = get_app();
+ if(! $xchan) {
+ if($a->profile['channel_hash'])
+ $r = q("select * from xchan where xchan_hash = '%s' limit 1",
+ dbesc($a->profile['channel_hash'])
+ );
+ if($r)
+ $xchan = $r[0];
+ }
+
+ if(! $xchan)
+ return;
+
+// FIXME - show connect button to observer if appropriate
$connect = false;
if(local_user()) {
$r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",