From a07193a22aa348ae5bad117bcb7b7e845d51907b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 2 Aug 2006 17:18:23 +0000 Subject: [PATCH] this change should let firebird work again correctly... or not. git-svn-id: file:///svn/phpbb/trunk@6229 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/firebird.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index e77225ae02..9654bb9610 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -49,7 +49,7 @@ class dbal_firebird extends dbal /** * @todo evaluate the implications of opening a service connection */ - $this->service_handle = @ibase_service_attach($this->server, $this->user, $sqlpassword); + $this->service_handle = (function_exists('ibase_service_attach')) ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false; return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); } @@ -59,7 +59,7 @@ class dbal_firebird extends dbal */ function sql_server_info() { - if ($this->service_handle !== false) + if ($this->service_handle !== false && function_exists('ibase_server_info')) { return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION); } @@ -76,7 +76,7 @@ class dbal_firebird extends dbal switch ($status) { case 'begin': - return true; + return @ibase_trans(); break; case 'commit': @@ -117,11 +117,6 @@ class dbal_firebird extends dbal $this->sql_error($query); } - if (!$this->transaction) - { - @ibase_commit(); - } - if ($cache_ttl && method_exists($cache, 'sql_save')) { $this->open_queries[(int) $this->query_result] = $this->query_result;