diff options
author | marijus <mario@localhost.localdomain> | 2013-12-14 09:57:57 +0100 |
---|---|---|
committer | marijus <mario@localhost.localdomain> | 2013-12-14 09:57:57 +0100 |
commit | c3c7a068332ae08aea5eeb8eaf820e34c9cf210b (patch) | |
tree | 91548f100a940632833648211ccb9893d0ca1042 /include/Contact.php | |
parent | ed5f725741455f9282a0dc38cd51b07e74b50ab1 (diff) | |
parent | a4624d29791af75fea7907caa4c8cf7a1cca90a0 (diff) | |
download | volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.tar.gz volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.tar.bz2 volse-hubzilla-c3c7a068332ae08aea5eeb8eaf820e34c9cf210b.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 13 |
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", |