mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
NOISSUE, change some code for php5
This commit is contained in:
parent
be662c8c2a
commit
f8af9ef6ce
6 changed files with 18 additions and 97 deletions
|
|
@ -50,6 +50,8 @@ if(!defined('__XE_LOADED_DB_CLASS__'))
|
|||
class DB
|
||||
{
|
||||
|
||||
static $isSupported = FALSE;
|
||||
|
||||
/**
|
||||
* priority of DBMS
|
||||
* @var array
|
||||
|
|
@ -385,7 +387,7 @@ class DB
|
|||
*/
|
||||
function isSupported()
|
||||
{
|
||||
return FALSE;
|
||||
return self::$isSupported;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -805,46 +807,6 @@ class DB
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns supported database list
|
||||
* @return array list of supported database
|
||||
*/
|
||||
function getSupportedDatabase()
|
||||
{
|
||||
$result = array();
|
||||
|
||||
if(function_exists('mysql_connect'))
|
||||
{
|
||||
$result[] = 'MySQL';
|
||||
}
|
||||
if(function_exists('cubrid_connect'))
|
||||
{
|
||||
$result[] = 'Cubrid';
|
||||
}
|
||||
if(function_exists('ibase_connect'))
|
||||
{
|
||||
$result[] = 'FireBird';
|
||||
}
|
||||
if(function_exists('pg_connect'))
|
||||
{
|
||||
$result[] = 'Postgre';
|
||||
}
|
||||
if(function_exists('sqlite_open'))
|
||||
{
|
||||
$result[] = 'sqlite2';
|
||||
}
|
||||
if(function_exists('mssql_connect'))
|
||||
{
|
||||
$result[] = 'MSSQL';
|
||||
}
|
||||
if(function_exists('PDO'))
|
||||
{
|
||||
$result[] = 'sqlite3(PDO)';
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop tables
|
||||
* @param string $table_name
|
||||
|
|
|
|||
|
|
@ -64,20 +64,6 @@ class DBCubrid extends DB
|
|||
return new DBCubrid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if supportable
|
||||
* Check 'cubrid_connect' function exists.
|
||||
* @return boolean
|
||||
*/
|
||||
function isSupported()
|
||||
{
|
||||
if(!function_exists('cubrid_connect'))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* DB Connect
|
||||
* this method is private
|
||||
|
|
@ -1190,5 +1176,8 @@ class DBCubrid extends DB
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
DBCubrid::$isSupported = function_exists('cubrid_connect');
|
||||
|
||||
/* End of file DBCubrid.class.php */
|
||||
/* Location: ./classes/db/DBCubrid.class.php */
|
||||
|
|
|
|||
|
|
@ -57,20 +57,6 @@ class DBMssql extends DB
|
|||
return new DBMssql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if supportable
|
||||
* Check 'sqlsrv' extension loaded.
|
||||
* @return boolean
|
||||
*/
|
||||
function isSupported()
|
||||
{
|
||||
if(!extension_loaded("sqlsrv"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* DB Connect
|
||||
* this method is private
|
||||
|
|
@ -1020,5 +1006,8 @@ class DBMssql extends DB
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
DBMssql::$isSupported = extension_loaded("sqlsrv");
|
||||
|
||||
/* End of file DBMssql.class.php */
|
||||
/* Location: ./classes/db/DBMssql.class.php */
|
||||
|
|
|
|||
|
|
@ -58,20 +58,6 @@ class DBMysql extends DB
|
|||
return new DBMysql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if supportable
|
||||
* Check 'mysql_connect' function exists.
|
||||
* @return boolean
|
||||
*/
|
||||
function isSupported()
|
||||
{
|
||||
if(!function_exists('mysql_connect'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* DB Connect
|
||||
* this method is private
|
||||
|
|
@ -884,5 +870,8 @@ class DBMysql extends DB
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
DBMysql::$isSupported = function_exists('mysql_connect');
|
||||
|
||||
/* End of file DBMysql.class.php */
|
||||
/* Location: ./classes/db/DBMysql.class.php */
|
||||
|
|
|
|||
|
|
@ -215,5 +215,8 @@ class DBMysql_innodb extends DBMysql
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
DBMysql_innodb::$isSupported = function_exists('mysql_connect');
|
||||
|
||||
/* End of file DBMysql_innodb.class.php */
|
||||
/* Location: ./classes/db/DBMysql_innodb.class.php */
|
||||
|
|
|
|||
|
|
@ -26,20 +26,6 @@ class DBMysqli extends DBMysql
|
|||
$this->_connect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if supportable
|
||||
* Check 'mysqli_connect' function exists.
|
||||
* @return boolean
|
||||
*/
|
||||
function isSupported()
|
||||
{
|
||||
if(!function_exists('mysqli_connect'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of this class
|
||||
* @return DBMysqli return DBMysqli object instance
|
||||
|
|
@ -444,5 +430,8 @@ class DBMysqli extends DBMysql
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
DBMysqli::$isSupported = function_exists('mysqli_connect');
|
||||
|
||||
/* End of file DBMysqli.class.php */
|
||||
/* Location: ./classes/db/DBMysqli.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue