From d103522ff364098ed26305b31d1cb62f87de1318 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 1 Oct 2009 15:11:12 -0400 Subject: check the schema --- lib/common.php | 6 ++++++ lib/default.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3-54-g00ecf