mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:15:13 +00:00
found the bugger
This commit is contained in:
parent
2e72b136c5
commit
7dfd9435f7
1 changed files with 5 additions and 1 deletions
6
boot.php
6
boot.php
|
@ -1317,12 +1317,16 @@ function fix_system_urls($oldurl,$newurl) {
|
||||||
if(! $parsed)
|
if(! $parsed)
|
||||||
continue;
|
continue;
|
||||||
$newhost = $parsed['host'];
|
$newhost = $parsed['host'];
|
||||||
|
|
||||||
// sometimes parse_url returns unexpected results.
|
// sometimes parse_url returns unexpected results.
|
||||||
|
|
||||||
if(strpos($newhost,'/') !== false)
|
if(strpos($newhost,'/') !== false)
|
||||||
$newhost = substr($newhost,0,strpos($newhost,'/'));
|
$newhost = substr($newhost,0,strpos($newhost,'/'));
|
||||||
|
|
||||||
$rhs = $newhost . (($parsed['port']) ? ':' . $parsed['port'] : '') . (($parsed['path']) ? $parsed['path'] : '');
|
$rhs = $newhost . (($parsed['port']) ? ':' . $parsed['port'] : '');
|
||||||
|
|
||||||
|
// paths aren't going to work. You have to be at the (sub)domain root
|
||||||
|
// . (($parsed['path']) ? $parsed['path'] : '');
|
||||||
|
|
||||||
$x = q("update xchan set xchan_addr = '%s', xchan_url = '%s', xchan_connurl = '%s', xchan_follow = '%s', xchan_connpage = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s' where xchan_hash = '%s' limit 1",
|
$x = q("update xchan set xchan_addr = '%s', xchan_url = '%s', xchan_connurl = '%s', xchan_follow = '%s', xchan_connpage = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s' where xchan_hash = '%s' limit 1",
|
||||||
dbesc($channel . '@' . $rhs),
|
dbesc($channel . '@' . $rhs),
|
||||||
|
|
Loading…
Reference in a new issue