aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Pubstream.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-13 16:38:18 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-13 16:38:18 +0200
commit71accb6b0a2aa5e3c77f7ef73d685639d0c6526a (patch)
treef38a48b65f692aab7076bb0ba23818295c2960f1 /Zotlabs/Module/Pubstream.php
parent2a95500b6538f130df9434f1fb253247872679e8 (diff)
downloadvolse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.gz
volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.bz2
volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Module/Pubstream.php')
-rw-r--r--Zotlabs/Module/Pubstream.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index 583974e22..1eb0e2142 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -75,7 +75,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
'default_location' => $channel['channel_location'],
'nickname' => $channel['channel_address'],
- 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
+ 'lockstate' => (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
'acl' => populate_acl($channel_acl,true, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'), get_post_aclDialogDescription(), 'acl_dialog_post'),
'permissions' => $channel_acl,
'bang' => '',
@@ -91,6 +91,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
);
$o .= '<div id="jot-popup">';
+ $a = '';
$o .= status_editor($a,$x,false,'Pubstream');
$o .= '</div>';
}
@@ -181,14 +182,14 @@ 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)) . "' " : '');
- $abook_uids = " and abook.abook_channel = " . intval(\App::$profile['profile_uid']) . " ";
-
$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']) . "' ) ";
//logger('update: ' . $update . ' load: ' . $load);
+ $items = [];
+
if($update) {
$ordering = get_config('system', 'pubstream_ordering', 'commented');
@@ -200,18 +201,18 @@ class Pubstream extends \Zotlabs\Web\Controller {
$net_query
WHERE mid = '%s' $uids $item_normal
and (abook.abook_blocked = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets $net_query2",
+ $sql_extra $net_query2",
dbesc($mid)
);
}
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 $abook_uids )
+ left join abook on ( item.author_xchan = abook.abook_xchan )
$net_query
WHERE true $uids and item.item_thread_top = 1 $item_normal
and (abook.abook_blocked = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets $net_query2
+ $sql_extra $net_query2
ORDER BY $ordering DESC $pager_sql "
);
}
@@ -223,7 +224,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
$net_query
WHERE mid = '%s' $uids $item_normal_update $simple_update
and (abook.abook_blocked = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets $net_query2",
+ $sql_extra $net_query2",
dbesc($mid)
);
}
@@ -234,7 +235,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
WHERE true $uids $item_normal_update
$simple_update
and (abook.abook_blocked = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets $net_query2"
+ $sql_extra $net_query2"
);
}
}
@@ -259,9 +260,6 @@ class Pubstream extends \Zotlabs\Web\Controller {
$items = fetch_post_tags($items,true);
$items = conv_sort($items,$ordering);
}
- else {
- $items = array();
- }
}