diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-22 19:32:08 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-22 19:32:08 -0700 |
commit | c49eec71f0995cd75be99a64a4dde398f9f0241b (patch) | |
tree | 06e29769c32460299d9c73794028e657e362b6e2 /include | |
parent | cdb1bc9be6fbc09caff62c0153386cc58a2bfbd9 (diff) | |
parent | b58bf75f21d15ac440bb3a90edb29afac9eb64ba (diff) | |
download | volse-hubzilla-c49eec71f0995cd75be99a64a4dde398f9f0241b.tar.gz volse-hubzilla-c49eec71f0995cd75be99a64a4dde398f9f0241b.tar.bz2 volse-hubzilla-c49eec71f0995cd75be99a64a4dde398f9f0241b.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 9 | ||||
-rw-r--r-- | include/zot.php | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/include/channel.php b/include/channel.php index d7116ce28..399dff87e 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2604,3 +2604,12 @@ function anon_identity_init($reqvars) { } +function pchan_to_chan($pchan) { + $chan = $pchan; + $chan['channel_address'] = $pchan['pchan_guid']; + $chan['channel_hash'] = $pchan['pchan_hash']; + $chan['channel_pubkey'] = $pchan['pchan_pubkey']; + $chan['channel_prvkey'] = $pchan['pchan_prvkey']; + $chan['channel_name'] = $pchan['xchan_name']; + return $chan; +}
\ No newline at end of file diff --git a/include/zot.php b/include/zot.php index 55632fc31..dad30dbb0 100644 --- a/include/zot.php +++ b/include/zot.php @@ -361,8 +361,6 @@ function zot_refresh($them, $channel = null, $force = false) { else $permissions = $j['permissions']; - $connected_set = false; - if($permissions && is_array($permissions)) { $old_read_stream_perm = get_abconfig($channel['channel_id'],$x['hash'],'their_perms','view_stream'); @@ -4177,7 +4175,7 @@ function zotinfo($arr) { if($ztarget_hash) { $permissions['connected'] = false; - $b = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", + $b = q("select * from abook where abook_xchan = '%s' and abook_channel = %d and abook_pending = 0 limit 1", dbesc($ztarget_hash), intval($e['channel_id']) ); @@ -4201,7 +4199,7 @@ function zotinfo($arr) { if($x) $ret['locations'] = $x; - $ret['site'] = zot_site_info($e['xchan_pubkey']); + $ret['site'] = zot_site_info($e['channel_prvkey']); check_zotinfo($e,$x,$ret); |