use null for db/database config, check for it

This commit is contained in:
Evan Prodromou 2011-12-03 11:45:56 -05:00
parent 821904230d
commit a818d5c61a
2 changed files with 8 additions and 1 deletions

View File

@ -66,7 +66,7 @@ $default =
'minify' => true, // true to use the minified versions of JS files; false to use orig files. Can aid during development
),
'db' =>
array('database' => 'YOU HAVE TO SET THIS IN config.php',
array('database' => null, // must be set
'schema_location' => INSTALLDIR . '/classes',
'class_location' => INSTALLDIR . '/classes',
'require_prefix' => 'classes/',

View File

@ -383,6 +383,7 @@ class StatusNet
$config['cache']['base'] = $config['memcached']['base'];
}
}
if (array_key_exists('xmpp', $config)) {
if ($config['xmpp']['enabled']) {
addPlugin('xmpp', array(
@ -398,6 +399,12 @@ class StatusNet
));
}
}
// Check for database server; must exist!
if (empty($config['db']['database'])) {
throw new ServerException("No database server for this site.");
}
}
/**