aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-30 15:01:22 -0800
committerzotlabs <mike@macgirvin.com>2017-01-30 15:01:22 -0800
commit7b065365e0d64a06ddfb7ade55e713a4b6a0f802 (patch)
tree319929299a1e92c95f6fc56da778893b30ace349 /include/network.php
parenteebea700193155b176ee9a9b338f1a0ad4b6aa40 (diff)
downloadvolse-hubzilla-7b065365e0d64a06ddfb7ade55e713a4b6a0f802.tar.gz
volse-hubzilla-7b065365e0d64a06ddfb7ade55e713a4b6a0f802.tar.bz2
volse-hubzilla-7b065365e0d64a06ddfb7ade55e713a4b6a0f802.zip
consolidate hubloc storage
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/network.php b/include/network.php
index 9049d016b..66716ef9e 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1469,15 +1469,18 @@ function discover_by_webbie($webbie) {
);
if(! $r) {
- $r = q("insert into hubloc ( hubloc_guid, hubloc_hash, hubloc_addr, hubloc_network, hubloc_url, hubloc_host, hubloc_callback, hubloc_updated, hubloc_primary ) values ('%s','%s','%s','%s','%s','%s','%s','%s', 1)",
- dbesc(($diaspora_guid) ? $diaspora_guid : $location),
- dbesc($address),
- dbesc($address),
- dbesc($network),
- dbesc($base),
- dbesc($host),
- dbesc($notify),
- dbescdate(datetime_convert())
+ $r = hubloc_store_lowlevel(
+ [
+ 'hubloc_guid' => (($diaspora_guid) ? $diaspora_guid : $location),
+ 'hubloc_hash' => $address,
+ 'hubloc_addr' => $address,
+ 'hubloc_network' => $network,
+ 'hubloc_url' => $base,
+ 'hubloc_host' => $host,
+ 'hubloc_callback' => $notify,
+ 'hubloc_updated' => datetime_convert(),
+ 'hubloc_primary' => 1
+ ]
);
}
$photos = import_xchan_photo($avatar,$address);