mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
Get real dbms version instead of relying on php internal functions which only grab the local library version
git-svn-id: file:///svn/phpbb/trunk@8821 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -57,10 +57,31 @@ class dbal_oracle extends dbal
|
||||
|
||||
/**
|
||||
* Version information about used database
|
||||
* @param bool $raw if true, only return the fetched sql_server_version
|
||||
* @return string sql server version
|
||||
*/
|
||||
function sql_server_info()
|
||||
function sql_server_info($raw = false)
|
||||
{
|
||||
return @oci_server_version($this->db_connect_id);
|
||||
/*
|
||||
global $cache;
|
||||
|
||||
if (empty($cache) || ($this->sql_server_version = $cache->get('oracle_version')) === false)
|
||||
{
|
||||
$result = @ociparse($this->db_connect_id, 'SELECT * FROM v$version WHERE banner LIKE \'Oracle%\'');
|
||||
@ociexecute($result, OCI_DEFAULT);
|
||||
@ocicommit($this->db_connect_id);
|
||||
|
||||
$row = array();
|
||||
@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS);
|
||||
@ocifreestatement($result);
|
||||
$this->sql_server_version = trim($row['BANNER']);
|
||||
|
||||
$cache->put('oracle_version', $this->sql_server_version);
|
||||
}
|
||||
*/
|
||||
$this->sql_server_version = @ociserverversion($this->db_connect_id);
|
||||
|
||||
return $this->sql_server_version;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user