need to accomodate different webbies on different hubs
This commit is contained in:
parent
2a0ff2b542
commit
0dd06b736a
@ -100,12 +100,13 @@ function create_identity($arr) {
|
|||||||
|
|
||||||
// Create a verified hub location pointing to this site.
|
// Create a verified hub location pointing to this site.
|
||||||
|
|
||||||
$r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_flags,
|
$r = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_flags,
|
||||||
hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
|
hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey )
|
||||||
values ( '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
|
values ( '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s' )",
|
||||||
dbesc($guid),
|
dbesc($guid),
|
||||||
dbesc($sig),
|
dbesc($sig),
|
||||||
dbesc($hash),
|
dbesc($hash),
|
||||||
|
dbesc($ret['channel']['channel_address'] . '@' . get_app()->get_hostname()),
|
||||||
intval(($primary) ? HUBLOC_FLAGS_PRIMARY : 0),
|
intval(($primary) ? HUBLOC_FLAGS_PRIMARY : 0),
|
||||||
dbesc(z_root()),
|
dbesc(z_root()),
|
||||||
dbesc(base64url_encode(rsa_sign(z_root(),$ret['channel']['channel_prvkey']))),
|
dbesc(base64url_encode(rsa_sign(z_root(),$ret['channel']['channel_prvkey']))),
|
||||||
|
@ -469,6 +469,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
|
|||||||
`hubloc_guid` char(255) NOT NULL DEFAULT '',
|
`hubloc_guid` char(255) NOT NULL DEFAULT '',
|
||||||
`hubloc_guid_sig` text NOT NULL,
|
`hubloc_guid_sig` text NOT NULL,
|
||||||
`hubloc_hash` char(255) NOT NULL,
|
`hubloc_hash` char(255) NOT NULL,
|
||||||
|
`hubloc_addr` char(255) NOT NULL DEFAULT '',
|
||||||
`hubloc_flags` int(10) unsigned NOT NULL DEFAULT '0',
|
`hubloc_flags` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`hubloc_url` char(255) NOT NULL DEFAULT '',
|
`hubloc_url` char(255) NOT NULL DEFAULT '',
|
||||||
`hubloc_url_sig` text NOT NULL,
|
`hubloc_url_sig` text NOT NULL,
|
||||||
@ -481,7 +482,8 @@ CREATE TABLE IF NOT EXISTS `hubloc` (
|
|||||||
KEY `hubloc_guid` (`hubloc_guid`),
|
KEY `hubloc_guid` (`hubloc_guid`),
|
||||||
KEY `hubloc_flags` (`hubloc_flags`),
|
KEY `hubloc_flags` (`hubloc_flags`),
|
||||||
KEY `hubloc_connect` (`hubloc_connect`),
|
KEY `hubloc_connect` (`hubloc_connect`),
|
||||||
KEY `hubloc_host` (`hubloc_host`)
|
KEY `hubloc_host` (`hubloc_host`),
|
||||||
|
KEY `hubloc_addr` (`hubloc_addr`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `intro` (
|
CREATE TABLE IF NOT EXISTS `intro` (
|
||||||
|
@ -79,6 +79,7 @@ function zfinger_init(&$a) {
|
|||||||
'url' => $hub['hubloc_url'],
|
'url' => $hub['hubloc_url'],
|
||||||
'url_sig' => $hub['hubloc_url_sig'],
|
'url_sig' => $hub['hubloc_url_sig'],
|
||||||
'host' => $hub['hubloc_host'],
|
'host' => $hub['hubloc_host'],
|
||||||
|
'address' => $hub['hubloc_addr'],
|
||||||
'callback' => $hub['hubloc_callback'],
|
'callback' => $hub['hubloc_callback'],
|
||||||
'sitekey' => $hub['hubloc_sitekey']
|
'sitekey' => $hub['hubloc_sitekey']
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user