diff options
author | Andrew Manning <tamanning@zoho.com> | 2017-01-29 20:02:34 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2017-01-29 20:02:34 -0500 |
commit | b58d56826bf9fd74a70a25848113c80baeeb8dfc (patch) | |
tree | 17b98611cb4af1ffc0dc4b85c0d173b0231b9f9f /include/network.php | |
parent | e770768b790f2441ef5371910568ff3bf6680dab (diff) | |
parent | dbf7ff979122ea0f8877e9ae4b16590f280593ef (diff) | |
download | volse-hubzilla-b58d56826bf9fd74a70a25848113c80baeeb8dfc.tar.gz volse-hubzilla-b58d56826bf9fd74a70a25848113c80baeeb8dfc.tar.bz2 volse-hubzilla-b58d56826bf9fd74a70a25848113c80baeeb8dfc.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/include/network.php b/include/network.php index 4391f1bfe..9049d016b 100644 --- a/include/network.php +++ b/include/network.php @@ -1121,16 +1121,17 @@ function discover_by_url($url,$arr = null) { if(! $photo) $photo = z_root() . '/images/rss_icon.png'; - $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_instance_url, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ", - dbesc($guid), - dbesc($guid), - dbesc($pubkey), - dbesc($addr), - dbesc($profile), - dbesc($name), - dbesc($network), - dbesc(z_root()), - dbesc(datetime_convert()) + $r = xchan_store_lowlevel( + [ + 'xchan_hash' => $guid, + 'xchan_guid' => $guid, + 'xchan_pubkey' => $pubkey, + 'xchan_addr' => $addr, + 'xchan_url' => $profile, + 'xchan_name' => $name, + 'xchan_name_date' => datetime_convert(), + 'xchan_network' => $network + ] ); $photos = import_xchan_photo($photo,$guid); @@ -1449,15 +1450,17 @@ function discover_by_webbie($webbie) { ); } else { - $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ", - dbesc($address), - dbesc(($diaspora_guid) ? $diaspora_guid : $location), - dbesc($pubkey), - dbesc($address), - dbesc($location), - dbesc($fullname), - dbesc($network), - dbescdate(datetime_convert()) + $r = xchan_store_lowlevel( + [ + 'xchan_hash' => $address, + 'xchan_guid' => (($diaspora_guid) ? $diaspora_guid : $location), + 'xchan_pubkey' => $pubkey, + 'xchan_addr' => $address, + 'xchan_url' => $location, + 'xchan_name' => $fullname, + 'xchan_name_date' => datetime_convert(), + 'xchan_network' => $network + ] ); } |