Fixed a bug for creating database instances

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8670 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-07-27 02:55:20 +00:00
parent 7a2281576a
commit 9d76ec0cd3

View file

@ -54,7 +54,8 @@
if(!$db_type) $db_type = Context::getDBType();
if(!$db_type && Context::isInstalled()) return new Object(-1, 'msg_db_not_setted');
if(!$GLOBALS['__DB__']) {
if(!isset($GLOBALS['__DB__'])) $GLOBALS['__DB__'] = array();
if(!isset($GLOBALS['__DB__'][$db_type])) {
$class_name = 'DB'.ucfirst($db_type);
$class_file = _XE_PATH_."classes/db/$class_name.class.php";
if(!file_exists($class_file)) return new Object(-1, 'msg_db_not_setted');