provide a controlling user for theme settings, not necessarily local_user() - can't test on my test site so moving into production and I'll debug it there.

This commit is contained in:
friendica
2013-07-16 22:48:05 -07:00
parent 6d447ace5c
commit 4c30cddbfc
4 changed files with 36 additions and 15 deletions

View File

@@ -43,6 +43,8 @@ function channelx_by_n($id) {
function vcard_from_xchan($xchan, $observer = null, $mode = '') {
$a = get_app();
$connect = false;
if(local_user()) {
$r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
@@ -53,6 +55,9 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
$connect = t('Connect');
}
if(array_key_exists('channel_id',$xchan))
$a->profile_uid = $xchan['channel_id'];
$url = (($observer)
? z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr']
: $xchan['xchan_url']