From 0c5a7ab19b9ccb76aebe006626bacb35b1e1c66b Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 8 Mar 2021 19:16:41 +0000 Subject: Define $sql_extra2 variable before concatenation --- include/taxonomy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/taxonomy.php b/include/taxonomy.php index 5fa4fde3f..19a843cc4 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -331,11 +331,12 @@ function pubtagblock($net,$site,$limit,$recent = 0,$safemode = 1, $type = TERM_H } -function pub_tagadelic($net,$site,$limit,$recent,$safemode,$type) { +function pub_tagadelic($net, $site, $limit, $recent, $safemode, $type) { $item_normal = item_normal(); $count = intval($limit); + $sql_extra = ""; if($site) $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 "; else { -- cgit v1.2.3 From c9ec5043b9d1638da9ea1d66b55a84c961920ec1 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 8 Mar 2021 19:22:17 +0000 Subject: Check if HTTP port is defined --- include/queue_fn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/queue_fn.php b/include/queue_fn.php index b72730d2f..b505a5b22 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -132,7 +132,7 @@ function queue_deliver($outq, $immediate = false) { $base = null; $h = parse_url($outq['outq_posturl']); if($h !== false) - $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : ''); + $base = $h['scheme'] . '://' . $h['host'] . (array_key_exists('port', $h) ? ':' . $h['port'] : ''); if(($base) && ($base !== z_root()) && ($immediate)) { $y = q("select site_update, site_dead from site where site_url = '%s' ", -- cgit v1.2.3 From 1ad6308f979572343cffdce83638273a6e210f28 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 8 Mar 2021 20:43:29 +0000 Subject: Formatting --- include/taxonomy.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/taxonomy.php b/include/taxonomy.php index 19a843cc4..f765a9f0e 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -332,11 +332,10 @@ function pubtagblock($net,$site,$limit,$recent = 0,$safemode = 1, $type = TERM_H function pub_tagadelic($net, $site, $limit, $recent, $safemode, $type) { - - $item_normal = item_normal(); - $count = intval($limit); - - $sql_extra = ""; + + $item_normal = item_normal(); + $count = intval($limit); + $sql_extra = ""; if($site) $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 "; else { -- cgit v1.2.3 From 975d8ef0c7fba8fdc26f29dae9cd47c7f6079e67 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 9 Mar 2021 09:06:16 +0000 Subject: Fix deprecated function arguments order --- include/items.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 88f100e60..a1198bb4d 100644 --- a/include/items.php +++ b/include/items.php @@ -4853,7 +4853,7 @@ function item_remove_cid($xchan_hash,$mid,$uid) { } // Set item permissions based on results obtained from linkify_tags() -function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false, &$private) { +function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, &$private, $parent_item = false) { $first_access_tag = true; foreach($linkified as $x) { -- cgit v1.2.3