aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-08 19:35:45 +0000
committerMax Kostikov <max@kostikov.co>2021-03-08 19:35:45 +0000
commite4512842561cf1a6b6e482085c27a77aac20b59a (patch)
treebe3e76c96480bd415d15527136da22aad53fb310 /Zotlabs
parentc9ec5043b9d1638da9ea1d66b55a84c961920ec1 (diff)
downloadvolse-hubzilla-e4512842561cf1a6b6e482085c27a77aac20b59a.tar.gz
volse-hubzilla-e4512842561cf1a6b6e482085c27a77aac20b59a.tar.bz2
volse-hubzilla-e4512842561cf1a6b6e482085c27a77aac20b59a.zip
Check if port in the site URL provided
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 5fefb2979..f8f312c7c 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -104,7 +104,10 @@ class Activity {
if ($x['success']) {
$m = parse_url($url);
if ($m) {
- $site_url = unparse_url(['scheme' => $m['scheme'], 'host' => $m['host'], 'port' => $m['port'] ]);
+ $y = [ 'scheme' => $m['scheme'], 'host' => $m['host'] ];
+ if (array_key_exists('port', $m))
+ $y['port'] = $m['port'];
+ $site_url = unparse_url($y);
q("UPDATE site SET site_update = '%s', site_dead = 0 WHERE site_url = '%s' AND site_update < %s - INTERVAL %s",
dbesc(datetime_convert()),
dbesc($site_url),