summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php6
-rw-r--r--lib/default.php3
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 58e208a4e..ce33c871b 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -232,6 +232,12 @@ require_once INSTALLDIR.'/lib/serverexception.php';
Config::loadSettings();
+// XXX: if plugins should check the schema at runtime, do that here.
+
+if ($config['db']['schemacheck'] == 'runtime') {
+ Event::handle('CheckSchema');
+}
+
// XXX: other formats here
define('NICKNAME_FMT', VALIDATE_NUM.VALIDATE_ALPHA_LOWER);
diff --git a/lib/default.php b/lib/default.php
index 7af94d2ad..f9670cb7f 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -64,7 +64,8 @@ $default =
'utf8' => true,
'db_driver' => 'DB', # XXX: JanRain libs only work with DB
'quote_identifiers' => false,
- 'type' => 'mysql' ),
+ 'type' => 'mysql',
+ 'schemacheck' => 'runtime'), // 'runtime' or 'script'
'syslog' =>
array('appname' => 'statusnet', # for syslog
'priority' => 'debug', # XXX: currently ignored