mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 07:32:32 +01:00
Enhancement for postgresql support
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001 Fabien Seisen <seisen@linuxfr.org>
|
||||
* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
@@ -479,7 +479,7 @@ class DoliDb
|
||||
else $loop=false;
|
||||
}
|
||||
|
||||
if ($usesavepoint)
|
||||
if ($usesavepoint && $this->transaction_opened)
|
||||
{
|
||||
@pg_query($this->db, 'SAVEPOINT mysavepoint');
|
||||
}
|
||||
@@ -497,7 +497,7 @@ class DoliDb
|
||||
//print "\n>> ".$query."<br>\n";
|
||||
//print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."<br>\n";
|
||||
|
||||
if ($usesavepoint)
|
||||
if ($usesavepoint && $this->transaction_opened)
|
||||
{
|
||||
@pg_query($this->db, 'ROLLBACK TO SAVEPOINT mysavepoint');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user