diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-03 16:43:30 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-04-03 16:43:30 -0700 |
commit | d6c23486d563e29862d3db891e67649d13e6def0 (patch) | |
tree | aec0bc40905c4204eb13975e331978a4ce461007 /include/zot.php | |
parent | 26125bcf0b8ce98fa4522f89792d7e77f25ff1ca (diff) | |
download | volse-hubzilla-d6c23486d563e29862d3db891e67649d13e6def0.tar.gz volse-hubzilla-d6c23486d563e29862d3db891e67649d13e6def0.tar.bz2 volse-hubzilla-d6c23486d563e29862d3db891e67649d13e6def0.zip |
create site_store_lowlevel() to initialise data structures for the site table
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/include/zot.php b/include/zot.php index 266060839..1a4f6534b 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2897,22 +2897,24 @@ function import_site($arr, $pubkey) { else { $update = true; - $r = q("insert into site ( site_location, site_url, site_access, site_flags, site_update, site_directory, site_register, site_sellpage, site_realm, site_type, site_project, site_version, site_crypto ) - values ( '%s', '%s', %d, %d, '%s', '%s', %d, '%s', '%s', %d, '%s', '%s', '%s' )", - dbesc($site_location), - dbesc($url), - intval($access_policy), - intval($site_directory), - dbesc(datetime_convert()), - dbesc($directory_url), - intval($register_policy), - dbesc($sellpage), - dbesc($site_realm), - intval(SITE_TYPE_ZOT), - dbesc($site_project), - dbesc($site_version), - dbesc($site_crypto) + $r = site_store_lowlevel( + [ + 'site_location' => $site_location, + 'site_url' => $url, + 'site_access' => intval($access_policy), + 'site_flags' => intval($site_directory), + 'site_update' => datetime_convert(), + 'site_directory' => $directory_url, + 'site_register' => intval($register_policy), + 'site_sellpage' => $sellpage, + 'site_realm' => $site_realm, + 'site_type' => intval(SITE_TYPE_ZOT), + 'site_project' => $site_project, + 'site_version' => $site_version, + 'site_crypto' => $site_crypto + ] ); + if(! $r) { logger('import_site: record create failed. ' . print_r($arr,true)); } |