aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-28 15:01:19 -0800
committerzotlabs <mike@macgirvin.com>2017-01-28 15:01:19 -0800
commit5aa0017e91cac135ef8b84c138becb09decb1d58 (patch)
treec44b5632ab4493bfc8731b7614e8ee66bf260bca /include/zot.php
parentf90d5f3dc8b26d5a1fd3e44013385bda9a7361b2 (diff)
downloadvolse-hubzilla-5aa0017e91cac135ef8b84c138becb09decb1d58.tar.gz
volse-hubzilla-5aa0017e91cac135ef8b84c138becb09decb1d58.tar.bz2
volse-hubzilla-5aa0017e91cac135ef8b84c138becb09decb1d58.zip
provide lowlevel xchan storage function to ensure that all non-null rows are initialised
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/zot.php b/include/zot.php
index 24b50cc12..1538e956e 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -759,28 +759,28 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
&& ($arr['site']['url'] != z_root()))
$arr['searchable'] = false;
- $x = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_mimetype,
- xchan_photo_l, xchan_addr, xchan_url, xchan_connurl, xchan_follow, xchan_connpage, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_selfcensored, xchan_deleted, xchan_pubforum )
- values ( '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d) ",
- dbesc($xchan_hash),
- dbesc($arr['guid']),
- dbesc($arr['guid_sig']),
- dbesc($arr['key']),
- dbesc($arr['photo_mimetype']),
- dbesc($arr['photo']),
- dbesc($arr['address']),
- dbesc($arr['url']),
- dbesc($arr['connections_url']),
- dbesc($arr['follow_url']),
- dbesc($arr['connect_url']),
- dbesc(($arr['name']) ? $arr['name'] : '-'),
- dbesc('zot'),
- dbescdate($arr['photo_updated']),
- dbescdate($arr['name_updated']),
- intval(1 - intval($arr['searchable'])),
- intval($arr['adult_content']),
- intval($arr['deleted']),
- intval($arr['public_forum'])
+ $x = xchan_store_lowlevel(
+ [
+ 'xchan_hash' => $xchan_hash,
+ 'xchan_guid' => $arr['guid'],
+ 'xchan_guid_sig' => $arr['guid_sig'],
+ 'xchan_pubkey' => $arr['key'],
+ 'xchan_photo_mimetype' => $arr['photo_mimetype'],
+ 'xchan_photo_l' => $arr['photo'],
+ 'xchan_addr' => $arr['address'],
+ 'xchan_url' => $arr['url'],
+ 'xchan_connurl' => $arr['connections_url'],
+ 'xchan_follow' => $arr['follow_url'],
+ 'xchan_connpage' => $arr['connect_url'],
+ 'xchan_name' => (($arr['name']) ? $arr['name'] : '-'),
+ 'xchan_network' => 'zot',
+ 'xchan_photo_date' => $arr['photo_updated'],
+ 'xchan_name_date' => $arr['name_updated'],
+ 'xchan_hidden' => intval(1 - intval($arr['searchable'])),
+ 'xchan_selfcensored' => $arr['adult_content'],
+ 'xchan_deleted' => $arr['deleted'],
+ 'xchan_pubforum' => $arr['public_forum']
+ ]
);
$what .= 'new_xchan';