diff --git a/lib/default.php b/lib/default.php index 0f321efe0e..b20af476d6 100644 --- a/lib/default.php +++ b/lib/default.php @@ -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/', diff --git a/lib/statusnet.php b/lib/statusnet.php index bffa625773..5a20789e01 100644 --- a/lib/statusnet.php +++ b/lib/statusnet.php @@ -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."); + } } /**