aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2017-10-25 13:29:19 +0200
committerMario <mario@mariovavti.com>2017-10-25 13:29:19 +0200
commit344aa13c64f0fa7a246f3284bf9cdb267e6101d3 (patch)
tree943809c01164dda7b6e4a26bc3d6c7e8c48bd6eb /include/security.php
parent61c86212b944efa0d78dcc0364b81bfb8a0d19bc (diff)
parent69b22e3f7916b5ba19b5ed03a55ad72bf5995291 (diff)
downloadvolse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.tar.gz
volse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.tar.bz2
volse-hubzilla-344aa13c64f0fa7a246f3284bf9cdb267e6101d3.zip
Merge branch '2.8RC'
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/security.php b/include/security.php
index 6e7b3dbb2..450cc4f69 100644
--- a/include/security.php
+++ b/include/security.php
@@ -114,9 +114,9 @@ function atoken_xchan($atoken) {
'atoken_id' => $atoken['atoken_id'],
'xchan_hash' => substr($c['channel_hash'],0,16) . '.' . $atoken['atoken_name'],
'xchan_name' => $atoken['atoken_name'],
- 'xchan_addr' => t('guest:') . $atoken['atoken_name'] . '@' . \App::get_hostname(),
+ 'xchan_addr' => 'guest:' . $atoken['atoken_name'] . '@' . \App::get_hostname(),
'xchan_network' => 'unknown',
- 'xchan_url' => z_root(),
+ 'xchan_url' => z_root() . '/guest/' . substr($c['channel_hash'],0,16) . '.' . $atoken['atoken_name'],
'xchan_hidden' => 1,
'xchan_photo_mimetype' => 'image/jpeg',
'xchan_photo_l' => get_default_profile_photo(300),
@@ -640,7 +640,7 @@ function stream_perms_xchans($perms = NULL ) {
if(local_channel())
$ret[] = get_observer_hash();
- $x = q("select uid from pconfig where cat = 'perm_limits' and k = 'view_stream' ");
+ $x = q("select uid, v from pconfig where cat = 'perm_limits' and k = 'view_stream' ");
if($x) {
$y = [];
foreach($x as $xv) {
@@ -650,6 +650,7 @@ function stream_perms_xchans($perms = NULL ) {
}
if($y) {
$ids = ids_to_querystr($y,'uid');
+
$r = q("select channel_hash from channel where channel_id in ( $ids ) and ( channel_pageflags & %d ) = 0 and channel_system = 0 and channel_removed = 0 ",
intval(PAGE_ADULT|PAGE_CENSORED)
);