diff options
author | Andrew Manning <tamanning@zoho.com> | 2017-01-29 19:53:41 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2017-01-29 19:53:41 -0500 |
commit | f8918604087af97a9e416ba2a8503920f8b08186 (patch) | |
tree | 1332a4686c05f9a659f0b3aeb6acc51948921720 /include/items.php | |
parent | 3424c7dc878ecf5b1f1c021737e3d7eba2443299 (diff) | |
parent | dbf7ff979122ea0f8877e9ae4b16590f280593ef (diff) | |
download | volse-hubzilla-f8918604087af97a9e416ba2a8503920f8b08186.tar.gz volse-hubzilla-f8918604087af97a9e416ba2a8503920f8b08186.tar.bz2 volse-hubzilla-f8918604087af97a9e416ba2a8503920f8b08186.zip |
Merge remote-tracking branch 'upstream/dev' into affinity-settings
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/include/items.php b/include/items.php index 0d9fb02a4..559992b7f 100755 --- a/include/items.php +++ b/include/items.php @@ -833,13 +833,15 @@ function import_author_rss($x) { } $name = trim($x['name']); - $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_url, xchan_name, xchan_network ) - values ( '%s', '%s', '%s', '%s', '%s' )", - dbesc($x['guid']), - dbesc($x['guid']), - dbesc($x['url']), - dbesc(($name) ? $name : t('(Unknown)')), - dbesc('rss') + $r = xchan_store_lowlevel( + [ + 'xchan_hash' => $x['guid'], + 'xchan_guid' => $x['guid'], + 'xchan_url' => $x['url'], + 'xchan_name' => (($name) ? $name : t('(Unknown)')), + 'xchan_name_date' => datetime_convert(), + 'xchan_network' => 'rss' + ] ); if($r && $x['photo']) { @@ -878,14 +880,17 @@ function import_author_unknown($x) { $name = trim($x['name']); - $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_url, xchan_name, xchan_network ) - values ( '%s', '%s', '%s', '%s', '%s' )", - dbesc($x['url']), - dbesc($x['url']), - dbesc($x['url']), - dbesc(($name) ? $name : t('(Unknown)')), - dbesc('unknown') + $r = xchan_store_lowlevel( + [ + 'xchan_hash' => $x['url'], + 'xchan_guid' => $x['url'], + 'xchan_url' => $x['url'], + 'xchan_name' => (($name) ? $name : t('(Unknown)')), + 'xchan_name_date' => datetime_convert(), + 'xchan_network' => 'unknown' + ] ); + if($r && $x['photo']) { $photos = import_xchan_photo($x['photo']['src'],$x['url']); @@ -1516,6 +1521,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) { $arr['deny_cid'] = ((x($arr,'deny_cid')) ? trim($arr['deny_cid']) : ''); $arr['deny_gid'] = ((x($arr,'deny_gid')) ? trim($arr['deny_gid']) : ''); $arr['postopts'] = ((x($arr,'postopts')) ? trim($arr['postopts']) : ''); + $arr['route'] = ((x($arr,'route')) ? trim($arr['route']) : ''); $arr['item_private'] = ((x($arr,'item_private')) ? intval($arr['item_private']) : 0 ); $arr['item_wall'] = ((x($arr,'item_wall')) ? intval($arr['item_wall']) : 0 ); $arr['item_type'] = ((x($arr,'item_type')) ? intval($arr['item_type']) : 0 ); |