aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Pubstream.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-26 18:12:56 +0000
committerMario <mario@mariovavti.com>2022-10-26 18:12:56 +0000
commit40ae6b396f3760c4c4b6e4de776869a88ce07fce (patch)
treee54516ed5ca3d86faf24e1833c1b88294366f7a9 /Zotlabs/Module/Pubstream.php
parent9c117ffa0546d6131310ae175e16e5ebf63992a1 (diff)
downloadvolse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.tar.gz
volse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.tar.bz2
volse-hubzilla-40ae6b396f3760c4c4b6e4de776869a88ce07fce.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Pubstream.php')
-rw-r--r--Zotlabs/Module/Pubstream.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index 1eb0e2142..3c8dfa0a5 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -159,11 +159,13 @@ class Pubstream extends \Zotlabs\Web\Controller {
require_once('include/channel.php');
require_once('include/security.php');
+ $sys = get_sys_channel();
+ $abook_uids = " and abook.abook_channel = " . intval($sys['channel_id']) . " ";
+
if($site_firehose) {
$uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {
- $sys = get_sys_channel();
$uids = " and item.uid = " . intval($sys['channel_id']) . " ";
$sql_extra = item_permissions_sql($sys['channel_id']);
\App::$data['firehose'] = intval($sys['channel_id']);
@@ -182,7 +184,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
$net_query = (($net) ? " left join xchan on xchan_hash = author_xchan " : '');
$net_query2 = (($net) ? " and xchan_network = '" . protect_sprintf(dbesc($net)) . "' " : '');
- $simple_update = '';
if($update && $_SESSION['loadtime'])
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
@@ -208,7 +209,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
else {
// Fetch a page full of parent items for this page
$r = dbq("SELECT item.id AS item_id FROM item
- left join abook on ( item.author_xchan = abook.abook_xchan )
+ left join abook on ( item.author_xchan = abook.abook_xchan $abook_uids )
$net_query
WHERE true $uids and item.item_thread_top = 1 $item_normal
and (abook.abook_blocked = 0 or abook.abook_flags is null)