aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authoranaqreon <tamanning@zoho.com>2014-12-30 16:06:35 -0600
committeranaqreon <tamanning@zoho.com>2014-12-30 16:06:35 -0600
commitb78a545a1056e6db9f4b6b4f262182b0a5c56e67 (patch)
tree515c2f742a5a39e18b00debf1849ee9703fa4a42 /mod/display.php
parentd67c5a6ffd134602084a6dcb37b316bf768bf715 (diff)
parent43671a0a323afa758df56c06822ce3c46da026df (diff)
downloadvolse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.gz
volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.bz2
volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.zip
Merge pull request #1 from friendica/master
Pull from upstream
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/mod/display.php b/mod/display.php
index ece406543..7d7f4ca13 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -133,6 +133,7 @@ function display_content(&$a, $update = 0, $load = false) {
'$order' => '',
'$file' => '',
'$cats' => '',
+ '$tags' => '',
'$dend' => '',
'$dbegin' => '',
'$mid' => $item_hash
@@ -156,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
@@ -177,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
@@ -187,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)
);
}