aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-05-02 14:43:22 +0000
committerMario <mario@mariovavti.com>2024-05-02 14:43:22 +0000
commitfb4568001d5669055f8a5c010b04fd460bb43a43 (patch)
tree35213fd8177035c4babb3125bfc30ecef351d737 /Zotlabs
parent5eab32a65bdaa0b8bcc31bae9f43b53814bf1636 (diff)
parent630cecd740762cc6111468b46644fcae85a360b3 (diff)
downloadvolse-hubzilla-fb4568001d5669055f8a5c010b04fd460bb43a43.tar.gz
volse-hubzilla-fb4568001d5669055f8a5c010b04fd460bb43a43.tar.bz2
volse-hubzilla-fb4568001d5669055f8a5c010b04fd460bb43a43.zip
Merge branch 'fix-broken-get_rpost_path' into 'dev'
Libzot: get_rpost_path was broken for URL's with no port. See merge request hubzilla/core!2123
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Libzot.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 89157bf5e..bc944c97c 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -2569,9 +2569,14 @@ class Libzot {
if (!$observer)
return '';
- $parsed = parse_url($observer['xchan_url']);
+ $url = $observer['xchan_url'];
+ if (preg_match('|^https?://|', $url) === 0) {
+ $url = "https://{$url}";
+ }
+
+ $parsed = parse_url($url);
- return $parsed['scheme'] . '://' . $parsed['host'] . (($parsed['port']) ? ':' . $parsed['port'] : '') . '/rpost?f=';
+ return $parsed['scheme'] . '://' . $parsed['host'] . (isset($parsed['port']) ? ':' . $parsed['port'] : '') . '/rpost?f=';
}
/**