summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-01 15:11:12 -0400
committerEvan Prodromou <evan@status.net>2009-10-01 15:11:12 -0400
commitd103522ff364098ed26305b31d1cb62f87de1318 (patch)
tree2e40dc7163f60777ea7466dac1134f8f50a5e3b3 /lib
parentb980f5e45b613d60e968e84b304ef9db260f24c2 (diff)
check the schema
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