From: Evan Prodromou Date: Sat, 3 Dec 2011 16:45:56 +0000 (-0500) Subject: use null for db/database config, check for it X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a818d5c61a97283be6e9226ee3aeeeadc4a0153f;p=quix0rs-gnu-social.git use null for db/database config, check for it --- 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."); + } } /**