#19790379 added db check in enviroment

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8412 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-05-31 01:45:08 +00:00
parent 82ac064cff
commit 6e2fb02acd
13 changed files with 65 additions and 3 deletions

View file

@ -230,12 +230,17 @@
// 5. Check gd(imagecreatefromgif function)
if(function_exists('imagecreatefromgif')) $checklist['gd'] = true;
else $checklist['gd'] = false;
// 6. Check DB
if(DB::getEnableList()) $checklist['db'] = true;
else $checklist['db'] = false;
if(!$checklist['php_version'] || !$checklist['permission'] || !$checklist['xml'] || !$checklist['session']) $install_enable = false;
if(!$checklist['php_version'] || !$checklist['permission'] || !$checklist['xml'] || !$checklist['session'] || !$checklist['db']) $install_enable = false;
else $install_enable = true;
// Save the checked result to the Context
Context::set('checklist', $checklist);
Context::set('install_enable', $install_enable);
Context::set('phpversion', phpversion());
return $install_enable;
}