diff options
author | zotlabs <mike@macgirvin.com> | 2019-04-25 21:45:04 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-04-25 21:45:04 -0700 |
commit | 96785e8df1b325a32c93ebebf67ab5208f4088dc (patch) | |
tree | 887e8b227dc471c0a739a0c9b244680ad93ab239 /boot.php | |
parent | 26039adf5b8624b1d1d3685419d8628ddded04b7 (diff) | |
download | volse-hubzilla-96785e8df1b325a32c93ebebf67ab5208f4088dc.tar.gz volse-hubzilla-96785e8df1b325a32c93ebebf67ab5208f4088dc.tar.bz2 volse-hubzilla-96785e8df1b325a32c93ebebf67ab5208f4088dc.zip |
update fix_system_urls() to handle zot6 hublocs
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1507,12 +1507,13 @@ function fix_system_urls($oldurl, $newurl) { dbesc($rv['xchan_hash']) ); - $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_url_sig = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", + $y = q("update hubloc set hubloc_addr = '%s', hubloc_url = '%s', hubloc_id_url = '%s', hubloc_url_sig = '%s', hubloc_host = '%s', hubloc_callback = '%s' where hubloc_hash = '%s' and hubloc_url = '%s'", dbesc($channel_address . '@' . $rhs), dbesc($newurl), - dbesc(base64url_encode(rsa_sign($newurl,$c[0]['channel_prvkey']))), + dbesc(str_replace($oldurl,$newurl,$rv['hubloc_id_url'])), + dbesc(($rv['hubloc_network'] === 'zot6') ? \Zotlabs\Lib\Libzot::sign($newurl,$c[0]['channel_prvkey']) : base64url_encode(rsa_sign($newurl,$c[0]['channel_prvkey']))), dbesc($newhost), - dbesc($newurl . '/post'), + dbesc(($rv['hubloc_network'] === 'zot6') ? $newurl . '/zot' : $newurl . '/post'), dbesc($rv['xchan_hash']), dbesc($oldurl) ); |