aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-04-03 16:43:30 -0700
committerMario Vavti <mario@mariovavti.com>2017-04-04 10:02:33 +0200
commit50612565e97bcb20a822f94766fb5e1bd38f7cda (patch)
tree5c1510fb86fe712461db1696d0381d269f0f1d13 /include/zot.php
parenta9bda2b12e3d393fa854e23207a081052e2e7bfd (diff)
downloadvolse-hubzilla-50612565e97bcb20a822f94766fb5e1bd38f7cda.tar.gz
volse-hubzilla-50612565e97bcb20a822f94766fb5e1bd38f7cda.tar.bz2
volse-hubzilla-50612565e97bcb20a822f94766fb5e1bd38f7cda.zip
create site_store_lowlevel() to initialise data structures for the site table
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php32
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));
}