cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mysql.php mysqli.php oci8.php pgsql.php querysim.php sqlite.php

From: Date: Thu, 17 Aug 2006 10:56:12 +0000
Subject: cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mysql.php mysqli.php oci8.php pgsql.php querysim.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-41653@lists.php.net to get a copy of this message
lsmith Thu Aug 17 10:56:12 2006 UTC Modified files: /pear/MDB2/MDB2/Driver fbsql.php ibase.php mysql.php mysqli.php oci8.php pgsql.php querysim.php sqlite.php Log: - fixed and cleaned up handling return values when disable_query is set in _doQuery() and _execute()

http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.120&r2=1.121&diff_format=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.120 pear/MDB2/MDB2/Driver/fbsql.php:1.121 --- pear/MDB2/MDB2/Driver/fbsql.php:1.120 Sat Jul 22 08:01:56 2006 +++ pear/MDB2/MDB2/Driver/fbsql.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.120 2006/07/22 08:01:56 lsmith Exp $ +// $Id: fbsql.php,v 1.121 2006/08/17 10:56:12 lsmith Exp $ // /** @@ -366,10 +366,8 @@ $query = $result; } if ($this->options['disable_query']) { - if ($is_manip) { - return 0; - } - return null; + $result = $is_manip ? 0 : null; + return $result; } if (is_null($connection)) { http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/ibase.php?r1=1.184&r2=1.185&diff_format=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.184 pear/MDB2/MDB2/Driver/ibase.php:1.185 --- pear/MDB2/MDB2/Driver/ibase.php:1.184 Mon Jul 31 11:56:45 2006 +++ pear/MDB2/MDB2/Driver/ibase.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.184 2006/07/31 11:56:45 lsmith Exp $ +// $Id: ibase.php,v 1.185 2006/08/17 10:56:12 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -1401,12 +1401,8 @@ $this->db->last_query = $this->query; $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); if ($this->db->getOption('disable_query')) { - if ($this->is_manip) { - $return = 0; - return $return; - } - $null = null; - return $null; + $result = $this->is_manip ? 0 : null; + return $result; } $connection = $this->db->getConnection(); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mysql.php?r1=1.153&r2=1.154&diff_format=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.153 pear/MDB2/MDB2/Driver/mysql.php:1.154 --- pear/MDB2/MDB2/Driver/mysql.php:1.153 Sat Aug 12 15:45:20 2006 +++ pear/MDB2/MDB2/Driver/mysql.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.153 2006/08/12 15:45:20 lsmith Exp $ +// $Id: mysql.php,v 1.154 2006/08/17 10:56:12 lsmith Exp $ // /** @@ -585,10 +585,8 @@ $query = $result; } if ($this->options['disable_query']) { - if ($is_manip) { - return 0; - } - return null; + $result = $is_manip ? 0 : null; + return $result; } if (is_null($connection)) { @@ -1317,12 +1315,8 @@ $this->db->last_query = $this->query; $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); if ($this->db->getOption('disable_query')) { - if ($this->is_manip) { - $return = 0; - return $return; - } - $null = null; - return $null; + $result = $this->is_manip ? 0 : null; + return $result; } $connection = $this->db->getConnection(); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.129&r2=1.130&diff_format=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.129 pear/MDB2/MDB2/Driver/mysqli.php:1.130 --- pear/MDB2/MDB2/Driver/mysqli.php:1.129 Sat Aug 12 15:45:20 2006 +++ pear/MDB2/MDB2/Driver/mysqli.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.129 2006/08/12 15:45:20 lsmith Exp $ +// $Id: mysqli.php,v 1.130 2006/08/17 10:56:12 lsmith Exp $ // /** @@ -589,10 +589,8 @@ $query = $result; } if ($this->options['disable_query']) { - if ($is_manip) { - return 0; - } - return null; + $result = $is_manip ? 0 : null; + return $result; } if (is_null($connection)) { @@ -1417,12 +1415,8 @@ $this->db->last_query = $this->query; $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); if ($this->db->getOption('disable_query')) { - if ($this->is_manip) { - $return = 0; - return $return; - } - $null = null; - return $null; + $result = $this->is_manip ? 0 : null; + return $result; } $connection = $this->db->getConnection(); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/oci8.php?r1=1.171&r2=1.172&diff_format=u Index: pear/MDB2/MDB2/Driver/oci8.php diff -u pear/MDB2/MDB2/Driver/oci8.php:1.171 pear/MDB2/MDB2/Driver/oci8.php:1.172 --- pear/MDB2/MDB2/Driver/oci8.php:1.171 Tue Aug 8 06:23:04 2006 +++ pear/MDB2/MDB2/Driver/oci8.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.171 2006/08/08 06:23:04 lsmith Exp $ +// $Id: oci8.php,v 1.172 2006/08/17 10:56:12 lsmith Exp $ /** * MDB2 OCI8 driver @@ -1320,12 +1320,8 @@ $this->db->last_query = $this->query; $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); if ($this->db->getOption('disable_query')) { - if ($this->is_manip) { - $return = 0; - return $return; - } - $null = null; - return $null; + $result = $this->is_manip ? 0 : null; + return $result; } $connection = $this->db->getConnection(); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.151&r2=1.152&diff_format=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.151 pear/MDB2/MDB2/Driver/pgsql.php:1.152 --- pear/MDB2/MDB2/Driver/pgsql.php:1.151 Mon Jul 31 11:56:45 2006 +++ pear/MDB2/MDB2/Driver/pgsql.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.151 2006/07/31 11:56:45 lsmith Exp $ +// $Id: pgsql.php,v 1.152 2006/08/17 10:56:12 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -602,10 +602,8 @@ $query = $result; } if ($this->options['disable_query']) { - if ($is_manip) { - return 0; - } - return null; + $result = $is_manip ? 0 : null; + return $result; } if (is_null($connection)) { @@ -1231,12 +1229,8 @@ $this->db->last_query = $this->query; $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); if ($this->db->getOption('disable_query')) { - if ($this->is_manip) { - $return = 0; - return $return; - } - $null = null; - return $null; + $result = $this->is_manip ? 0 : null; + return $result; } $connection = $this->db->getConnection(); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/querysim.php?r1=1.72&r2=1.73&diff_format=u Index: pear/MDB2/MDB2/Driver/querysim.php diff -u pear/MDB2/MDB2/Driver/querysim.php:1.72 pear/MDB2/MDB2/Driver/querysim.php:1.73 --- pear/MDB2/MDB2/Driver/querysim.php:1.72 Wed Jul 19 14:13:32 2006 +++ pear/MDB2/MDB2/Driver/querysim.php Thu Aug 17 10:56:12 2006 @@ -61,7 +61,7 @@ // | please contact Alan Richmond. | // +----------------------------------------------------------------------+ // -// $Id: querysim.php,v 1.72 2006/07/19 14:13:32 lsmith Exp $ +// $Id: querysim.php,v 1.73 2006/08/17 10:56:12 lsmith Exp $ // /* @@ -371,7 +371,8 @@ return $err; } if ($this->options['disable_query']) { - return null; + $result = $is_manip ? 0 : null; + return $result; } $result = $this->_buildResult($query); http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.134&r2=1.135&diff_format=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.134 pear/MDB2/MDB2/Driver/sqlite.php:1.135 --- pear/MDB2/MDB2/Driver/sqlite.php:1.134 Sat Jul 22 08:01:57 2006 +++ pear/MDB2/MDB2/Driver/sqlite.php Thu Aug 17 10:56:12 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.134 2006/07/22 08:01:57 lsmith Exp $ +// $Id: sqlite.php,v 1.135 2006/08/17 10:56:12 lsmith Exp $ // /** @@ -494,10 +494,8 @@ $query = $result; } if ($this->options['disable_query']) { - if ($is__manip) { - return 0; - } - return null; + $result = $is_manip ? 0 : null; + return $result; } if (is_null($connection)) {
« previous php.pear.cvs (#41653) next »