aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-12-20 13:37:46 +0000
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-12-20 13:37:46 +0000
commitb0da38c09aa12f186e9413cf34b3eeff92d96b47 (patch)
tree545564851e25e69172070c6d7b83360fedf3937c /mod/display.php
parent49a4ca9182195c99ace39d1a897c4578bd932d76 (diff)
parent6d8214f96bfc8b981fae7c0ffe0cba68206dd86b (diff)
downloadvolse-hubzilla-b0da38c09aa12f186e9413cf34b3eeff92d96b47.tar.gz
volse-hubzilla-b0da38c09aa12f186e9413cf34b3eeff92d96b47.tar.bz2
volse-hubzilla-b0da38c09aa12f186e9413cf34b3eeff92d96b47.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/mod/display.php b/mod/display.php
index 55f7c1306..7d7f4ca13 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -157,6 +157,7 @@ function display_content(&$a, $update = 0, $load = false) {
require_once('include/identity.php');
$sys = get_sys_channel();
+ $sysid = $sys['channel_id'];
if(local_user()) {
$r = q("SELECT * from item
@@ -178,8 +179,8 @@ function display_content(&$a, $update = 0, $load = false) {
// in case somebody turned off public access to sys channel content using permissions
// make that content unsearchable by ensuring the owner_xchan can't match
- if(! perm_is_allowed($sys['channel_id'],$observer_hash,'view_stream'))
- $sys['xchan_hash'] .= 'disabled';
+ if(! perm_is_allowed($sysid,$observer_hash,'view_stream'))
+ $sysid = 0;
$r = q("SELECT * from item
@@ -188,11 +189,11 @@ function display_content(&$a, $update = 0, $load = false) {
AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
AND `item`.`deny_gid` = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer_hash) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
- OR owner_xchan = '%s')
+ OR uid = %d )
$sql_extra )
limit 1",
dbesc($target_item['parent_mid']),
- dbesc($sys['xchan_hash'])
+ intval($sysid)
);
}