mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Remove and disable all other DB classes
This commit is contained in:
parent
0e4eec6a3f
commit
f00ba6f272
3 changed files with 7 additions and 2496 deletions
|
|
@ -23,9 +23,7 @@ class DB
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $priority_dbms = array(
|
protected static $priority_dbms = array(
|
||||||
'mysqli' => 6,
|
'mysql' => 1,
|
||||||
'cubrid' => 2,
|
|
||||||
'mssql' => 1
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -108,7 +106,7 @@ class DB
|
||||||
protected $cache_file = 'files/cache/queries/';
|
protected $cache_file = 'files/cache/queries/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* stores database type: 'mysql','cubrid','mssql' etc. or 'db' when database is not yet set
|
* stores database type, e.g. mysql
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $db_type;
|
public $db_type;
|
||||||
|
|
@ -136,15 +134,15 @@ class DB
|
||||||
if(!$db_type)
|
if(!$db_type)
|
||||||
{
|
{
|
||||||
$db_type = config('db.master.type');
|
$db_type = config('db.master.type');
|
||||||
if (config('db.master.engine') === 'innodb')
|
|
||||||
{
|
|
||||||
$db_type .= '_innodb';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(!$db_type && Context::isInstalled())
|
if(!$db_type && Context::isInstalled())
|
||||||
{
|
{
|
||||||
return new BaseObject(-1, 'msg_db_not_setted');
|
return new BaseObject(-1, 'msg_db_not_setted');
|
||||||
}
|
}
|
||||||
|
if(!strncmp($db_type, 'mysql', 5))
|
||||||
|
{
|
||||||
|
$db_type = 'mysql';
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($GLOBALS['__DB__']))
|
if(!isset($GLOBALS['__DB__']))
|
||||||
{
|
{
|
||||||
|
|
@ -271,7 +269,7 @@ class DB
|
||||||
// after creating instance of class, check is supported
|
// after creating instance of class, check is supported
|
||||||
foreach ($supported_list as $db_type)
|
foreach ($supported_list as $db_type)
|
||||||
{
|
{
|
||||||
if (strncasecmp($db_type, 'mysql', 5) === 0 && strtolower($db_type) !== 'mysqli')
|
if (strtolower($db_type) !== 'mysql')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue