Update ADODB library with latest release. It fixes some more deprecation warning...
authorJehan-Guillaume (ioguix) de Rorthais <ioguix@digix.(none)>
Fri, 12 Mar 2010 23:46:57 +0000 (00:46 +0100)
committerJehan-Guillaume (ioguix) de Rorthais <ioguix@digix.(none)>
Fri, 12 Mar 2010 23:46:57 +0000 (00:46 +0100)
libraries/adodb/adodb-csvlib.inc.php
libraries/adodb/adodb-datadict.inc.php
libraries/adodb/adodb-iterator.inc.php
libraries/adodb/adodb.inc.php
libraries/adodb/drivers/adodb-postgres.inc.php
libraries/adodb/drivers/adodb-postgres64.inc.php
libraries/adodb/drivers/adodb-postgres7.inc.php
libraries/adodb/drivers/adodb-postgres8.inc.php [changed mode: 0755->0644]

index 1f7543f9f3b93a5b965ab40b29d7547baa036902..7b1c9e11977959d786c42c71027e925f05423652 100644 (file)
@@ -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);
index efcd453bb9781e6027d86486be596b857e988d79..19500ca90841f3e24ddf19e68bfefa2ec4863f3f 100644 (file)
@@ -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));
        }
index 55d66a35ba7fedd0355159b200b8767847d86c08..0ecea26f0032c4151f27b441c7e9497d6e4d5649 100755 (executable)
@@ -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.
index 02b375aeb695a17136d5f7eab61d559a680a6402..9752d106f7c55a2d6ef71ca6716b24ece7a8a071 100755 (executable)
@@ -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.
                /**
                 * 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. 
                
                $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 {
                        
                $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();
        *  @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;
        }
        {
        global $ADODB_CACHE_DIR, $ADODB_CACHE;
                
+               if (empty($ADODB_CACHE)) return false;
+               
                if (!$sql) {
                         $ADODB_CACHE->flushall($this->debug);
                 return;
        {
        global $ADODB_CACHE;
        
+               if (empty($ADODB_CACHE)) $this->_CreateCache();
+               
                if (!is_numeric($secs2cache)) {
                        $inputarr = $sql;
                        $sql = $secs2cache;
                $rs = $this->SelectLimit($sql,1);
                if (!$rs) return $false; // table does not exist
                $rs->tableName = $table;
+               $rs->sql = $sql;
                
                switch((string) $mode) {
                case 'UPDATE':
index 491e4ccdb87bd9c6a65c19f3838b5cc66edadfae..b4e69b685da1f0137eba027596434aa591dab2d7 100644 (file)
@@ -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.
index 1444d02dc73d0078a3cc9fa0d5225a963f63695c..82fc328a7e234de60963b23e50f8c5574da6b1e4 100644 (file)
@@ -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':
index 191ee360881510a46ff63395ab76ee830bede08a..57fb9a632dabf927f97b9c5be5e0c5729a0e04fe 100644 (file)
@@ -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.
old mode 100755 (executable)
new mode 100644 (file)
index 05a705e..f4bbe36
@@ -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.