diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
commit | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch) | |
tree | 482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/gallery/hooks | |
parent | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff) | |
parent | 9d66783f47636153bf3661d1d89e694dd5188c36 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/hooks')
-rw-r--r-- | modules/gallery/hooks/init_gallery.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/hooks/init_gallery.php b/modules/gallery/hooks/init_gallery.php index 10383e9a..64e44b56 100644 --- a/modules/gallery/hooks/init_gallery.php +++ b/modules/gallery/hooks/init_gallery.php @@ -24,6 +24,15 @@ if (!file_exists(VARPATH . "database.php")) { url::redirect(url::abs_file("installer")); } +// Simple and cheap test to make sure that the database config is ok. Do this before we do +// anything else database related. +try { + Database::instance()->connect(); +} catch (Kohana_PHP_Exception $e) { + print "Database configuration error. Please check var/database.php"; + exit; +} + Event::add("system.ready", array("Gallery_I18n", "instance")); Event::add("system.ready", array("module", "load_modules")); Event::add("system.ready", array("gallery", "ready")); |