aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2017-01-29 20:02:34 -0500
committerAndrew Manning <tamanning@zoho.com>2017-01-29 20:02:34 -0500
commitb58d56826bf9fd74a70a25848113c80baeeb8dfc (patch)
tree17b98611cb4af1ffc0dc4b85c0d173b0231b9f9f /include/security.php
parente770768b790f2441ef5371910568ff3bf6680dab (diff)
parentdbf7ff979122ea0f8877e9ae4b16590f280593ef (diff)
downloadvolse-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/security.php')
-rw-r--r--include/security.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/include/security.php b/include/security.php
index 2f5de54c7..57b33251f 100644
--- a/include/security.php
+++ b/include/security.php
@@ -171,19 +171,16 @@ function atoken_create_xchan($xchan) {
if($r)
return;
- $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_photo_mimetype, xchan_photo_l, xchan_photo_m, xchan_photo_s )
- values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
- dbesc($xchan['xchan_hash']),
- dbesc($xchan['xchan_hash']),
- dbesc($xchan['xchan_addr']),
- dbesc($xchan['xchan_url']),
- dbesc($xchan['xchan_name']),
- dbesc($xchan['xchan_network']),
- dbesc($xchan['xchan_photo_mimetype']),
- dbesc($xchan['xchan_photo_l']),
- dbesc($xchan['xchan_photo_m']),
- dbesc($xchan['xchan_photo_s'])
- );
+ $xchan['xchan_guid'] = $xchan['xchan_hash'];
+
+ $store = [];
+ foreach($xchan as $k => $v) {
+ if(strpos($k,'xchan_') === 0) {
+ $store[$k] = $v;
+ }
+ }
+
+ $r = xchan_store_lowlevel($store);
return true;
}