cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php

From: Date: Mon, 07 Feb 2005 09:32:27 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-29162@lists.php.net to get a copy of this message
quipo Mon Feb 7 04:32:27 2005 EDT Modified files: /pear/MDB2/MDB2/Driver/Datatype ibase.php Log: use ibase_blob_import() http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/ibase.php?r1=1.21&r2=1.22&ty=u Index: pear/MDB2/MDB2/Driver/Datatype/ibase.php diff -u pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.21 pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.22 --- pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.21 Sun Jan 2 16:44:24 2005 +++ pear/MDB2/MDB2/Driver/Datatype/ibase.php Mon Feb 7 04:32:27 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.21 2005/01/02 21:44:24 lsmith Exp $ +// $Id: ibase.php,v 1.22 2005/02/07 09:32:27 quipo Exp $ // require_once 'MDB2/Driver/Datatype/Common.php'; @@ -431,31 +431,14 @@ @rewind($fp); $value = $fp; } - $handle = @ibase_blob_create($db->in_transaction ? $db->transaction_id : $db->connection); - if ($handle) { - while (!@feof($value)) { - $data = @fread($value, $db->options['lob_buffer_length']); - $result = @ibase_blob_add($handle, $data); - if ($result === false) { - $result = $db->raiseError(MDB2_ERROR, null, null, - 'Could not add data to a large object: '.ibase_errmsg()); - break; - } - } - if ($close) { - @fclose($value); - } - if (MDB2::isError($result)) { - @ibase_blob_cancel($handle); - } else { - $value = @ibase_blob_close($handle); - } - } else { - $result = $db->raiseError(); - } - if ($db->in_transaction) { + $value = @ibase_blob_import($db->transaction_id, $value); $db->commit(); + } else { + $value = @ibase_blob_import($db->connection, $value); + } + if ($close) { + @fclose($value); } return $value; }

« previous php.pear.cvs (#29162) next »