From 22ee0127205da3470c97222e6ae0f1f13c86b074 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 9 Jan 2009 18:33:48 +0000 Subject: Stage 1 of the installer. basically check that we can start as far as Kohana correctly --- core/helpers/module.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'core/helpers') diff --git a/core/helpers/module.php b/core/helpers/module.php index 4b98674e..de81c0bb 100644 --- a/core/helpers/module.php +++ b/core/helpers/module.php @@ -1,3 +1,4 @@ + find_all(); - } catch (Exception $e) { + // Check that we are installed. If not then head over to the installer. + $installed = Kohana::config("gallery.installed", false, false); + if (empty($installed)) { + $kohana_modules[] = DOCROOT . "installer"; + Kohana::config_set('core.modules', $kohana_modules); + $routes = Kohana::config("routes"); + $routes["_default"] = "installer"; + Kohana::config_set("routes", $routes); return; } - restore_error_handler(); + self::$module_names = array(); + self::$modules = array(); + + $modules = ORM::factory("module")->find_all(); try { foreach ($modules as $module) { -- cgit v1.2.3