phpBB

Code Changes

File: includes/db/oracle.php

  Unmodified   Added   Modified   Removed
Line 25Line 25
class dbal_oracle extends dbal
{
var $last_query_text = '';

class dbal_oracle extends dbal
{
var $last_query_text = '';

 
	var $connect_error = '';


/**
* Connect to server


/**
* Connect to server

Line 48Line 49
			$connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database;
}


			$connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database;
}


		$this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocilogon($this->user, $sqlpassword, $connect, 'UTF8'));



























		if ($new_link)
{
if (!function_exists('ocinlogon'))
{
$this->connect_error = 'ocinlogon function does not exist, is oci extension installed?';
return $this->sql_error('');
}
$this->db_connect_id = @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8');
}
else if ($this->persistency)
{
if (!function_exists('ociplogon'))
{
$this->connect_error = 'ociplogon function does not exist, is oci extension installed?';
return $this->sql_error('');
}
$this->db_connect_id = @ociplogon($this->user, $sqlpassword, $connect, 'UTF8');
}
else
{
if (!function_exists('ocilogon'))
{
$this->connect_error = 'ocilogon function does not exist, is oci extension installed?';
return $this->sql_error('');
}
$this->db_connect_id = @ocilogon($this->user, $sqlpassword, $connect, 'UTF8');
}


return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}


return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}

Line 268Line 295
						if (strlen($regs[3]) > 4000)
{
$cols = explode(', ', $regs[2]);

						if (strlen($regs[3]) > 4000)
{
$cols = explode(', ', $regs[2]);

 

preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);


/* The code inside this comment block breaks clob handling, but does allow the
database restore script to work. If you want to allow no posts longer than 4KB
and/or need the db restore script, uncomment this.



/* The code inside this comment block breaks clob handling, but does allow the
database restore script to work. If you want to allow no posts longer than 4KB
and/or need the db restore script, uncomment this.


							preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);

 

if (sizeof($cols) !== sizeof($vals))
{


if (sizeof($cols) !== sizeof($vals))
{

Line 645Line 673
	* @access private
*/
function _sql_error()

	* @access private
*/
function _sql_error()

 
	{
if (function_exists('ocierror'))

	{
$error = @ocierror();
$error = (!$error) ? @ocierror($this->query_result) : $error;

	{
$error = @ocierror();
$error = (!$error) ? @ocierror($this->query_result) : $error;

Line 657Line 687
		else
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();

		else
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();

 
			}
}
else
{
$error = array(
'message' => $this->connect_error,
'code' => '',
);

		}

return $error;

		}

return $error;