aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-14 20:23:33 +0000
committerMario <mario@mariovavti.com>2021-03-14 20:23:33 +0000
commited64eba13adf55e564d127e1640409fccca00fd3 (patch)
treee2dc03df24bf03b9f04f96afebbc2245e1fecff8
parent0fbd0ca416333ee5f675651be7bce5e82aad27fe (diff)
downloadvolse-hubzilla-ed64eba13adf55e564d127e1640409fccca00fd3.tar.gz
volse-hubzilla-ed64eba13adf55e564d127e1640409fccca00fd3.tar.bz2
volse-hubzilla-ed64eba13adf55e564d127e1640409fccca00fd3.zip
php8: fix some undefined variables
-rw-r--r--Zotlabs/Lib/Libzot.php1
-rw-r--r--Zotlabs/Module/Network.php2
-rw-r--r--Zotlabs/Widget/Activity_filter.php12
-rw-r--r--include/conversation.php3
-rw-r--r--include/items.php32
5 files changed, 26 insertions, 24 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 6aa49c5a7..db35dfb70 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -299,7 +299,6 @@ class Libzot {
}
$record = Zotfinger::exec($url, $channel);
-
// Check the HTTP signature
$hsig = $record['signature'];
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index ee6ff3619..a21095940 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -457,6 +457,8 @@ class Network extends \Zotlabs\Web\Controller {
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']) . "' ) ";
+ $items = [];
+
if($nouveau && $load) {
// "New Item View" - show all items unthreaded in reverse created date order
$items = q("SELECT item.*, item.id AS item_id, created FROM item
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 9200811b4..b7a69752e 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -12,10 +12,14 @@ class Activity_filter {
if(! local_channel())
return '';
- $cmd = \App::$cmd;
- $filter_active = false;
-
- $tabs = [];
+ $filter_active = '';
+ $dm_active = '';
+ $events_active = '';
+ $polls_active = '';
+ $starred_active = '';
+ $conv_active = '';
+ $tabs = [];
+ $cmd = \App::$cmd;
if(x($_GET,'dm')) {
$dm_active = (($_GET['dm'] == 1) ? 'active' : '');
diff --git a/include/conversation.php b/include/conversation.php
index f3e5fafa7..04aa1ef5a 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1313,6 +1313,7 @@ function hz_status_editor($a, $x, $popup = false) {
if($c && $c['channel_moved'])
return $o;
+ $webpage = ((x($x,'webpage')) ? $x['webpage'] : '');
$plaintext = true;
$feature_nocomment = feature_enabled($x['profile_uid'], 'disable_comments');
@@ -1366,8 +1367,6 @@ function hz_status_editor($a, $x, $popup = false) {
else
$id_select = '';
- $webpage = ((x($x,'webpage')) ? $x['webpage'] : '');
-
$reset = ((x($x,'reset')) ? $x['reset'] : '');
$feature_auto_save_draft = ((feature_enabled($x['profile_uid'], 'auto_save_draft')) ? "true" : "false");
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']) {