cvs: pear /MDB2/MDB2/Driver ibase.php
| From: | Lorenzo Alberton | Date: | Sun, 16 Oct 2005 20:50:45 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver ibase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35606@lists.php.net to get a copy of this message | ||
quipo Sun Oct 16 16:50:45 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver ibase.php
Log:
tweak disconnect()
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.112&r2=1.113&ty=u
Index: pear/MDB2/MDB2/Driver/ibase.php
diff -u pear/MDB2/MDB2/Driver/ibase.php:1.112 pear/MDB2/MDB2/Driver/ibase.php:1.113
--- pear/MDB2/MDB2/Driver/ibase.php:1.112 Sun Oct 16 10:34:01 2005
+++ pear/MDB2/MDB2/Driver/ibase.php Sun Oct 16 16:50:39 2005
@@ -43,7 +43,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: ibase.php,v 1.112 2005/10/16 14:34:01 lsmith Exp $
+// $Id: ibase.php,v 1.113 2005/10/16 20:50:39 quipo Exp $
/**
* MDB2 FireBird/InterBase driver
@@ -424,11 +424,12 @@
function disconnect($force = true)
{
if (is_resource($this->connection)) {
- if (!$this->opened_persistent || $force) {
- @ibase_close($this->connection);
- } elseif($this->in_transaction) {
+ if ($this->in_transaction) {
$this->rollback();
}
+ if ($force || !$this->opened_persistent) {
+ @ibase_close($this->connection);
+ }
$this->connection = 0;
$this->in_transaction = false;
}