diff options
author | Jehan-Guillaume (ioguix) de Rorthais | 2010-03-12 23:46:57 +0000 |
---|---|---|
committer | Jehan-Guillaume (ioguix) de Rorthais | 2010-03-12 23:46:57 +0000 |
commit | 071d447030bee412cb441cc674af9321b9ca1ea3 (patch) | |
tree | 0413f4571cd3deea9400c24703ab6a088b099cb8 | |
parent | 885e340719ab1a8a71643ee0220c9fb7e8f2dc03 (diff) |
Update ADODB library with latest release. It fixes some more deprecation warning about function removed in PHP 6.0. Reported by Christian Tessarek.
-rw-r--r-- | libraries/adodb/adodb-csvlib.inc.php | 3 | ||||
-rw-r--r-- | libraries/adodb/adodb-datadict.inc.php | 4 | ||||
-rwxr-xr-x | libraries/adodb/adodb-iterator.inc.php | 2 | ||||
-rwxr-xr-x | libraries/adodb/adodb.inc.php | 17 | ||||
-rw-r--r-- | libraries/adodb/drivers/adodb-postgres.inc.php | 2 | ||||
-rw-r--r-- | libraries/adodb/drivers/adodb-postgres64.inc.php | 10 | ||||
-rw-r--r-- | libraries/adodb/drivers/adodb-postgres7.inc.php | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | libraries/adodb/drivers/adodb-postgres8.inc.php | 2 |
8 files changed, 21 insertions, 21 deletions
diff --git a/libraries/adodb/adodb-csvlib.inc.php b/libraries/adodb/adodb-csvlib.inc.php index 1f7543f9..7b1c9e11 100644 --- a/libraries/adodb/adodb-csvlib.inc.php +++ b/libraries/adodb/adodb-csvlib.inc.php @@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1; /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. See License.txt. @@ -71,6 +71,7 @@ $ADODB_INCLUDED_CSV = 1; $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; $class = $rs->connection->arrayClass; $rs2 = new $class(); + $rs2->timeCreated = $rs->timeCreated; # memcache fix $rs2->sql = $rs->sql; $rs2->oldProvider = $rs->dataProvider; $rs2->InitArrayFields($rows,$flds); diff --git a/libraries/adodb/adodb-datadict.inc.php b/libraries/adodb/adodb-datadict.inc.php index efcd453b..19500ca9 100644 --- a/libraries/adodb/adodb-datadict.inc.php +++ b/libraries/adodb/adodb-datadict.inc.php @@ -1,7 +1,7 @@ <?php /** - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. @@ -519,7 +519,7 @@ class ADODB_DataDict { // genfields can return FALSE at times if ($lines == null) $lines = array(); list(,$first) = each($lines); - list(,$column_def) = split("[\t ]+",$first,2); + list(,$column_def) = preg_split("/[\t ]+/",$first,2); } return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); } diff --git a/libraries/adodb/adodb-iterator.inc.php b/libraries/adodb/adodb-iterator.inc.php index 55d66a35..0ecea26f 100755 --- a/libraries/adodb/adodb-iterator.inc.php +++ b/libraries/adodb/adodb-iterator.inc.php @@ -1,7 +1,7 @@ <?php /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. diff --git a/libraries/adodb/adodb.inc.php b/libraries/adodb/adodb.inc.php index 02b375ae..9752d106 100755 --- a/libraries/adodb/adodb.inc.php +++ b/libraries/adodb/adodb.inc.php @@ -14,7 +14,7 @@ /** \mainpage - @version V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + @version V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. You can choose which license you prefer. @@ -177,7 +177,7 @@ /** * ADODB version as a string. */ - $ADODB_vers = 'V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.'; + $ADODB_vers = 'V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.'; /** * Determines whether recordset->RecordCount() is used. @@ -516,9 +516,6 @@ $this->_isPersistentConnection = false; - global $ADODB_CACHE; - if (empty($ADODB_CACHE)) $this->_CreateCache(); - if ($forceNew) { if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true; } else { @@ -585,9 +582,6 @@ $this->_isPersistentConnection = true; - global $ADODB_CACHE; - if (empty($ADODB_CACHE)) $this->_CreateCache(); - if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true; if (isset($rez)) { $err = $this->ErrorMsg(); @@ -722,7 +716,7 @@ * @param $table name of table to lock * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock */ - function RowLock($table,$where) + function RowLock($table,$where,$col='1 as ignore') { return false; } @@ -1711,6 +1705,8 @@ { global $ADODB_CACHE_DIR, $ADODB_CACHE; + if (empty($ADODB_CACHE)) return false; + if (!$sql) { $ADODB_CACHE->flushall($this->debug); return; @@ -1767,6 +1763,8 @@ { global $ADODB_CACHE; + if (empty($ADODB_CACHE)) $this->_CreateCache(); + if (!is_numeric($secs2cache)) { $inputarr = $sql; $sql = $secs2cache; @@ -1879,6 +1877,7 @@ $rs = $this->SelectLimit($sql,1); if (!$rs) return $false; // table does not exist $rs->tableName = $table; + $rs->sql = $sql; switch((string) $mode) { case 'UPDATE': diff --git a/libraries/adodb/drivers/adodb-postgres.inc.php b/libraries/adodb/drivers/adodb-postgres.inc.php index 491e4ccd..b4e69b68 100644 --- a/libraries/adodb/drivers/adodb-postgres.inc.php +++ b/libraries/adodb/drivers/adodb-postgres.inc.php @@ -1,6 +1,6 @@ <?php /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. diff --git a/libraries/adodb/drivers/adodb-postgres64.inc.php b/libraries/adodb/drivers/adodb-postgres64.inc.php index 1444d02d..82fc328a 100644 --- a/libraries/adodb/drivers/adodb-postgres64.inc.php +++ b/libraries/adodb/drivers/adodb-postgres64.inc.php @@ -1,6 +1,6 @@ <?php /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. @@ -178,10 +178,10 @@ a different OID if a database must be reloaded. */ return @pg_Exec($this->_connectionID, "begin ".$this->_transmode); } - function RowLock($tables,$where,$flds='1 as ignore') + function RowLock($tables,$where,$col='1 as ignore') { if (!$this->transCnt) $this->BeginTrans(); - return $this->GetOne("select $flds from $tables where $where for update"); + return $this->GetOne("select $col from $tables where $where for update"); } // returns true/false. @@ -665,7 +665,7 @@ WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))'; if (strlen($db) == 0) $db = 'template1'; $db = adodb_addslashes($db); if ($str) { - $host = split(":", $str); + $host = explode(":", $str); if ($host[0]) $str = "host=".adodb_addslashes($host[0]); else $str = ''; if (isset($host[1])) $str .= " port=$host[1]"; @@ -1056,7 +1056,7 @@ class ADORecordSet_postgres64 extends ADORecordSet{ case 'INT4': case 'INT2': if (isset($fieldobj) && - empty($fieldobj->primary_key) && (!$this->uniqueIisR || empty($fieldobj->unique))) return 'I'; + empty($fieldobj->primary_key) && (!$this->connection->uniqueIisR || empty($fieldobj->unique))) return 'I'; case 'OID': case 'SERIAL': diff --git a/libraries/adodb/drivers/adodb-postgres7.inc.php b/libraries/adodb/drivers/adodb-postgres7.inc.php index 191ee360..57fb9a63 100644 --- a/libraries/adodb/drivers/adodb-postgres7.inc.php +++ b/libraries/adodb/drivers/adodb-postgres7.inc.php @@ -1,6 +1,6 @@ <?php /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. diff --git a/libraries/adodb/drivers/adodb-postgres8.inc.php b/libraries/adodb/drivers/adodb-postgres8.inc.php index 05a705eb..f4bbe36b 100755..100644 --- a/libraries/adodb/drivers/adodb-postgres8.inc.php +++ b/libraries/adodb/drivers/adodb-postgres8.inc.php @@ -1,6 +1,6 @@ <?php /* - V5.09 25 June 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. |