aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-14 20:23:33 +0000
committerMario <mario@mariovavti.com>2021-03-14 21:25:45 +0100
commita9a112e06358eec9040cdc03e1f7bf93ef21378d (patch)
tree35e7170b523126691243aa165c84c311edc8b837 /include/items.php
parent1e87fe6b4901aef213822abfbd1374cc09748850 (diff)
downloadvolse-hubzilla-a9a112e06358eec9040cdc03e1f7bf93ef21378d.tar.gz
volse-hubzilla-a9a112e06358eec9040cdc03e1f7bf93ef21378d.tar.bz2
volse-hubzilla-a9a112e06358eec9040cdc03e1f7bf93ef21378d.zip
php8: fix some undefined variables
(cherry picked from commit ed64eba13adf55e564d127e1640409fccca00fd3)
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php32
1 files changed, 15 insertions, 17 deletions
diff --git a/include/items.php b/include/items.php
index 3a59aaedb..8b22a7b4c 100644
--- a/include/items.php
+++ b/include/items.php
@@ -4488,18 +4488,23 @@ function zot_feed($uid, $observer_hash, $arr) {
function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = CLIENT_MODE_NORMAL,$module = 'network') {
- $result = array('success' => false);
-
- $sql_extra = '';
- $sql_nets = '';
+ $result = ['success' => false];
+ $sql_extra = '';
+ $sql_nets = '';
$sql_options = '';
- $sql_extra2 = '';
- $sql_extra3 = '';
- $def_acl = '';
-
- $item_uids = ' true ';
+ $sql_extra2 = '';
+ $sql_extra3 = '';
+ $def_acl = '';
+ $item_uids = ' true ';
$item_normal = item_normal();
+ if (! (isset($arr['include_follow']) && intval($arr['include_follow']))) {
+ $item_normal .= sprintf(" and not verb in ('%s', '%s') ",
+ dbesc(ACTIVITY_FOLLOW),
+ dbesc(ACTIVITY_UNFOLLOW)
+ );
+ }
+
if($arr['uid']) {
$uid = $arr['uid'];
}
@@ -4510,13 +4515,6 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
$item_uids = " item.uid = " . intval($uid) . " ";
}
- if (! (isset($arr['include_follow']) && intval($arr['include_follow']))) {
- $sql_options .= sprintf(" and not verb in ('%s', '%s') ",
- dbesc(ACTIVITY_FOLLOW),
- dbesc(ACTIVITY_UNFOLLOW)
- );
- }
-
if($arr['star'])
$sql_options .= " and item_starred = 1 ";
@@ -4584,7 +4582,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
}
if($channel && intval($arr['compat']) === 1) {
- $sql_extra = " AND author_xchan = '" . $channel['channel_hash'] . "' and item_private = 0 $sql_options $item_normal ";
+ $sql_extra = " AND author_xchan = '" . $channel['channel_hash'] . "' and item_private = 0 $item_normal ";
}
if ($arr['datequery']) {