diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
commit | bc2b948f1f6e62b1c277a4042200bb6678956f3f (patch) | |
tree | 8586c30e495607eee23f16c0aad40974f0711275 /Zotlabs/Module/Fhublocs.php | |
parent | 23e3e2c50499fab52769929a448e73012fd915af (diff) | |
parent | ff9442474d07cce24c8f66db39ec34471c3874a2 (diff) | |
download | volse-hubzilla-2.2.tar.gz volse-hubzilla-2.2.tar.bz2 volse-hubzilla-2.2.zip |
Merge branch 2.2RC2.2
Diffstat (limited to 'Zotlabs/Module/Fhublocs.php')
-rw-r--r-- | Zotlabs/Module/Fhublocs.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Zotlabs/Module/Fhublocs.php b/Zotlabs/Module/Fhublocs.php index cdf323a41..42c119da3 100644 --- a/Zotlabs/Module/Fhublocs.php +++ b/Zotlabs/Module/Fhublocs.php @@ -56,19 +56,21 @@ class Fhublocs extends \Zotlabs\Web\Controller { // Create a verified hub location pointing to this site. - $h = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_primary, hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey, hubloc_network ) - values ( '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s' )", - dbesc($rr['channel_guid']), - dbesc($rr['channel_guid_sig']), - dbesc($rr['channel_hash']), - dbesc(channel_reddress($rr)), - intval($primary), - dbesc(z_root()), - dbesc(base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey']))), - dbesc(\App::get_hostname()), - dbesc(z_root() . '/post'), - dbesc($sitekey), - dbesc('zot') + + $h = hubloc_store_lowlevel( + [ + 'hubloc_guid' => $rr['channel_guid'], + 'hubloc_guid_sig' => $rr['channel_guid_sig'], + 'hubloc_hash' => $rr['channel_hash'], + 'hubloc_addr' => channel_reddress($rr), + 'hubloc_network' => 'zot', + 'hubloc_primary' => $primary, + 'hubloc_url' => z_root(), + 'hubloc_url_sig' => base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey'])), + 'hubloc_host' => \App::get_hostname(), + 'hubloc_callback' => z_root() . '/post', + 'hubloc_sitekey' => $sitekey + ] ); if($h) |