aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-26 18:15:30 -0700
committerfriendica <info@friendica.com>2013-08-26 18:15:30 -0700
commit7dfd9435f78939166326755792ed8b319e5b5983 (patch)
tree36673ddbe143755a984399330a1f8a436d84d4a8
parent2e72b136c558652ca9a9b755b29cdb99ee27ee7f (diff)
downloadvolse-hubzilla-7dfd9435f78939166326755792ed8b319e5b5983.tar.gz
volse-hubzilla-7dfd9435f78939166326755792ed8b319e5b5983.tar.bz2
volse-hubzilla-7dfd9435f78939166326755792ed8b319e5b5983.zip
found the bugger
-rwxr-xr-xboot.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 7902313e6..d5210df95 100755
--- a/boot.php
+++ b/boot.php
@@ -1317,12 +1317,16 @@ function fix_system_urls($oldurl,$newurl) {
if(! $parsed)
continue;
$newhost = $parsed['host'];
+
// sometimes parse_url returns unexpected results.
if(strpos($newhost,'/') !== false)
$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",
dbesc($channel . '@' . $rhs),