finish remaining places where xchan_store_lowlevel needs to be used

This commit is contained in:
zotlabs 2017-01-29 15:25:24 -08:00
parent d5d67708ac
commit 9addcfe827
2 changed files with 21 additions and 31 deletions

View File

@ -248,23 +248,25 @@ class Import extends \Zotlabs\Web\Controller {
dbesc($channel['channel_hash']) dbesc($channel['channel_hash'])
); );
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_follow, xchan_connurl, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_hidden, xchan_orphan, xchan_censored, xchan_selfcensored, xchan_system, xchan_pubforum, xchan_deleted ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d, %d )",
dbesc($channel['channel_hash']), $r = xchan_store_lowlevel(
dbesc($channel['channel_guid']), [
dbesc($channel['channel_guid_sig']), 'xchan_hash' => $channel['channel_hash'],
dbesc($channel['channel_pubkey']), 'xchan_guid' => $channel['channel_guid'],
dbesc(z_root() . "/photo/profile/l/" . $channel['channel_id']), 'xchan_guid_sig' => $channel['channel_guid_sig'],
dbesc(z_root() . "/photo/profile/m/" . $channel['channel_id']), 'xchan_pubkey' => $channel['channel_pubkey'],
dbesc(z_root() . "/photo/profile/s/" . $channel['channel_id']), 'xchan_photo_l' => z_root() . "/photo/profile/l/" . $channel['channel_id'],
dbesc(channel_reddress($channel)), 'xchan_photo_m' => z_root() . "/photo/profile/m/" . $channel['channel_id'],
dbesc(z_root() . '/channel/' . $channel['channel_address']), 'xchan_photo_s' => z_root() . "/photo/profile/s/" . $channel['channel_id'],
dbesc(z_root() . '/follow?f=&url=%s'), 'xchan_addr' => channel_reddress($channel),
dbesc(z_root() . '/poco/' . $channel['channel_address']), 'xchan_url' => z_root() . '/channel/' . $channel['channel_address'],
dbesc($channel['channel_name']), 'xchan_connurl' => z_root() . '/poco/' . $channel['channel_address'],
dbesc('zot'), 'xchan_follow' => z_root() . '/follow?f=&url=%s',
dbesc(datetime_convert()), 'xchan_name' => $channel['channel_name'],
dbesc(datetime_convert()), 'xchan_network' => 'zot',
0,0,0,0,0,0,0 'xchan_photo_date' => datetime_convert(),
'xchan_name_date' => datetime_convert()
]
); );
} }
logger('import step 6'); logger('import step 6');

View File

@ -1450,7 +1450,6 @@ function discover_by_webbie($webbie) {
); );
} }
else { else {
$r = xchan_store_lowlevel( $r = xchan_store_lowlevel(
[ [
'xchan_hash' => $address, 'xchan_hash' => $address,
@ -1463,17 +1462,6 @@ function discover_by_webbie($webbie) {
'xchan_network' => $network 'xchan_network' => $network
] ]
); );
$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 = q("select * from hubloc where hubloc_hash = '%s' limit 1", $r = q("select * from hubloc where hubloc_hash = '%s' limit 1",