diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-09 18:33:48 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-01-09 18:33:48 +0000 |
commit | 22ee0127205da3470c97222e6ae0f1f13c86b074 (patch) | |
tree | e75c9849dbf781836b3139a7fbf74c99d10422dd /index.php | |
parent | b5fbee54a0d8f7a734a49bd4b6ea183ad9fa380e (diff) |
Stage 1 of the installer. basically check that we can start as far as Kohana correctly
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -45,6 +45,14 @@ define('MODPATH', strtr(realpath('modules') . '/', DIRECTORY_SEPARATOR, '/')); define('THEMEPATH', strtr(realpath('themes') . '/', DIRECTORY_SEPARATOR, '/')); define('SYSPATH', strtr(realpath('kohana') . '/', DIRECTORY_SEPARATOR, '/')); +if (!file_exists('var')) { + include DOCROOT . "installer/helpers/system_check.php"; + if (system_check::failed()) { + system_check::display_requirements(); + die; + } +} + // Force a test run if we're in command line mode. if (PHP_SAPI == 'cli') { array_splice($_SERVER['argv'], 1, 0, 'gallery_unit_test'); @@ -54,11 +62,7 @@ if (PHP_SAPI == 'cli') { @copy("var/database.php", VARPATH . "database.php"); } else { define('TEST_MODE', 0); - if (file_exists('var')) { - define('VARPATH', strtr(realpath('var') . '/', DIRECTORY_SEPARATOR, '/')); - } else { - define('VARPATH', strtr(getcwd() . '/var/', DIRECTORY_SEPARATOR, '/')); - } + define('VARPATH', strtr(realpath('var') . '/', DIRECTORY_SEPARATOR, '/')); } // Initialize. |