diff options
author | Arun Persaud <arun@nubati.net> | 2010-03-13 11:52:36 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2010-03-13 16:05:34 -0800 |
commit | cf764594cd00e66ee812c5d63b016bf286178f67 (patch) | |
tree | cd8ae9fa7bdd80ea5d0746bb85921ab2d416452a /index.php | |
parent | fceb0d9bc48ae848461e728abaf5065a2578da61 (diff) | |
download | e-DoKo-cf764594cd00e66ee812c5d63b016bf286178f67.tar.gz e-DoKo-cf764594cd00e66ee812c5d63b016bf286178f67.tar.bz2 e-DoKo-cf764594cd00e66ee812c5d63b016bf286178f67.zip |
added check in DB_open for correct DB-version
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -36,11 +36,17 @@ include_once("./include/functions.php"); /* the rest */ config_check(); /* open the database */ -if(DB_open()<0) +$DBopen = DB_open(); +if($DBopen<0) { output_header(); - echo "Database error, can't connect... Please wait a while and try again. ". - "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL."; + + if($DBopen == -1) + echo "Database error, can't connect... Please wait a while and try again. ". + "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL."; + else if ($DBopen == -2) + echo "Wrong database version, please update your database using the update.php script."; + output_footer(); exit(); } |