prepare for Comanchification of mod_photos

This commit is contained in:
friendica
2013-12-13 13:30:33 -08:00
parent 94975f8d30
commit 0215043826
3 changed files with 27 additions and 3 deletions

View File

@@ -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",