aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-14 18:11:36 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-14 18:11:36 -0700
commitd76348575299db76d8b6aabd460d21f6b3b0edfb (patch)
tree12f92496e470d162dc5ec63d767a288a8736f8f6 /boot.php
parent8f83c4ab6408dd3fa789304ce918205e688be4a8 (diff)
downloadvolse-hubzilla-d76348575299db76d8b6aabd460d21f6b3b0edfb.tar.gz
volse-hubzilla-d76348575299db76d8b6aabd460d21f6b3b0edfb.tar.bz2
volse-hubzilla-d76348575299db76d8b6aabd460d21f6b3b0edfb.zip
put in config framework for auto-update ability, plugins, etc.
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index c99024d00..95c0351f8 100644
--- a/boot.php
+++ b/boot.php
@@ -2,11 +2,13 @@
set_time_limit(0);
-define('EOL', "<br />\r\n");
+define ( 'BUILD_ID' , 1000 );
-define('REGISTER_CLOSED', 0);
-define('REGISTER_APPROVE', 1);
-define('REGISTER_OPEN', 2);
+define ( 'EOL', "<br />\r\n");
+
+define ( 'REGISTER_CLOSED', 0);
+define ( 'REGISTER_APPROVE', 1);
+define ( 'REGISTER_OPEN', 2);
define ( 'DIRECTION_ANY', 0);
define ( 'DIRECTION_IN', 1);
@@ -162,6 +164,25 @@ function system_unavailable() {
killme();
}}
+
+if(! function_exists('check_config')) {
+function check_config(&$a) {
+ $r = q("SELECT * FROM `config` WHERE `cat` = 'system' AND `k` IN ('url','build')");
+ if(! count($r)) {
+ q("INSERT INTO `config` (`cat`,`k`,`v`) VALUES ( 'system', 'url', '%s' )",
+ dbesc($a->get_baseurl())
+ );
+ q("INSERT INTO `config` (`cat`,`k`,`v`) VALUES ( 'system', 'build', '%s' )",
+ dbesc(BUILD_ID)
+ );
+ }
+
+
+
+}}
+
+
+
if(! function_exists('replace_macros')) {
function replace_macros($s,$r) {