diff options
author | zotlabs <mike@macgirvin.com> | 2017-04-03 16:43:30 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-04-04 10:02:33 +0200 |
commit | 50612565e97bcb20a822f94766fb5e1bd38f7cda (patch) | |
tree | 5c1510fb86fe712461db1696d0381d269f0f1d13 /include/hubloc.php | |
parent | a9bda2b12e3d393fa854e23207a081052e2e7bfd (diff) | |
download | volse-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/hubloc.php')
-rw-r--r-- | include/hubloc.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/hubloc.php b/include/hubloc.php index 599252522..0daa5908c 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -39,6 +39,33 @@ function hubloc_store_lowlevel($arr) { return create_table_from_array('hubloc', $store); } +function site_store_lowlevel($arr) { + + $store = [ + 'site_url' => ((array_key_exists('site_url',$arr)) ? $arr['site_url'] : ''), + 'site_access' => ((array_key_exists('site_access',$arr)) ? $arr['site_access'] : 0), + 'site_flags' => ((array_key_exists('site_flags',$arr)) ? $arr['site_flags'] : 0), + 'site_update' => ((array_key_exists('site_update',$arr)) ? $arr['site_update'] : NULL_DATE), + 'site_pull' => ((array_key_exists('site_pull',$arr)) ? $arr['site_pull'] : NULL_DATE), + 'site_sync' => ((array_key_exists('site_sync',$arr)) ? $arr['site_sync'] : NULL_DATE), + 'site_directory' => ((array_key_exists('site_directory',$arr)) ? $arr['site_directory'] : ''), + 'site_register' => ((array_key_exists('site_register',$arr)) ? $arr['site_register'] : 0), + 'site_sellpage' => ((array_key_exists('site_sellpage',$arr)) ? $arr['site_sellpage'] : ''), + 'site_location' => ((array_key_exists('site_location',$arr)) ? $arr['site_location'] : ''), + 'site_realm' => ((array_key_exists('site_realm',$arr)) ? $arr['site_realm'] : ''), + 'site_valid' => ((array_key_exists('site_valid',$arr)) ? $arr['site_valid'] : 0), + 'site_dead' => ((array_key_exists('site_dead',$arr)) ? $arr['site_dead'] : 0), + 'site_type' => ((array_key_exists('site_type',$arr)) ? $arr['site_type'] : 0), + 'site_project' => ((array_key_exists('site_project',$arr)) ? $arr['site_project'] : ''), + 'site_version' => ((array_key_exists('site_version',$arr)) ? $arr['site_version'] : ''), + 'site_crypto' => ((array_key_exists('site_crypto',$arr)) ? $arr['site_crypto'] : '') + ]; + + return create_table_from_array('site', $store); +} + + + function prune_hub_reinstalls() { |