Added some changes that were skipped at the merge in DB.class.php.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8676 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-07-27 17:54:38 +00:00
parent 6831e6e767
commit 76dc825253

View file

@ -17,6 +17,17 @@
var $count_cache_path = 'files/cache/db';
var $cond_operation = array( ///< operations for condition
'equal' => '=',
'more' => '>=',
'excess' => '>',
'less' => '<=',
'below' => '<',
'notequal' => '<>',
'notnull' => 'is not null',
'null' => 'is null',
);
var $fd = NULL; ///< connector resource or file description
var $result = NULL; ///< result
@ -43,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');
@ -78,6 +90,48 @@
return $oDB->_getSupportedList();
}
/**
* @brief returns list of enable in supported db
* @return list of enable in supported db
**/
function getEnableList()
{
if(!$this->supported_list)
{
$oDB = new DB();
$this->supported_list = $oDB->_getSupportedList();
}
$enableList = array();
if(is_array($this->supported_list))
{
foreach($this->supported_list AS $key=>$value)
if($value->enable) array_push($enableList, $value);
}
return $enableList;
}
/**
* @brief returns list of disable in supported db
* @return list of disable in supported db
**/
function getDisableList()
{
if(!$this->supported_list)
{
$oDB = new DB();
$this->supported_list = $oDB->_getSupportedList();
}
$disableList = array();
if(is_array($this->supported_list))
{
foreach($this->supported_list AS $key=>$value)
if(!$value->enable) array_push($disableList, $value);
}
return $disableList;
}
/**
* @brief returns list of supported db
* @return list of supported db