Commit 1048c9b8 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1859528: Update ADODB to 5.20.16"

parents 9149add5 657becc4
......@@ -159,11 +159,11 @@ try {
// Now we have a connection, verify the server is a new enough version
$dbversion = $db->ServerInfo();
if (is_postgres()) {
$okversion = '8.3';
$okversion = '9.3';
$dbfriendlyname = 'PostgreSQL';
}
else if (is_mysql()) {
$okversion = '5.0.25';
$okversion = '5.6';
$dbfriendlyname = 'MySQL';
}
if (floatval($dbversion['version']) < floatval($okversion)) {
......
......@@ -2,22 +2,17 @@ adodb
-----
Website: http://adodb.org/
Version: 5.20.14
Version: 5.20.16
Modifications:
- RecordSet_postgres7->MoveNext() - remove expensive is_array() (04ef8a3b9770f93326a2ece31e4089368117faca)
- check for Postgres 8.1 (c6dfccadfae432147fff99fa15b0985dcae7e503) okversion is now 8.3.
- Allow check for $okversion of Postgres or MySql (c6dfccadfae432147fff99fa15b0985dcae7e503)
-- Minimum working version values should be in updated in Mahara's README.md file and in init.php
- Check for valid columns in adodb postgres64 driver MetaIndexes fn (b87d9961020a8d52a2eaf709a9197520b3c6b65b)
- add __wakeup to connection object (417077459037550239fe9b09bd20b50d4c19b57f)
- Deleted many files we're not using, including tests, docs, other drivers, other error langs (9d44b44a2ae1923c9a07105e6932cda1af30b099)
- Deleted many files/folders we're not using: /cute_icons, /tests, /docs, /drivers except non-deprecated mysql and postgres, /datadict except mysql and postgres, /lang except english, /pear, /perf, /replicate, .git*, mailmap.
- Modified session variable setting from $_SESSION to $SESSION->set/get due to sessions now normally being closed. (f9818ff606bbe6ec00b34eab23d1743870407b48)
- Moved the define ADODB_ASSOC_CASE_* calls as they are needed by ADONewConnection (741aa7d2150d22e9206ffa1fd8a93e3f4d697324)
- Bug 1619036: Fix a bug when determine if an array is associative (606317195f8f3a8cdf9bc448c537b8c3708d75d7)
- Removing the obsolete adodb-mysql.inc.php (2f19a42ddd6af732e40b1aae9359ee80e28f9111)
- escaping names when showing table / index (08939ca25acddff39b132e4bd823668b98447947)
- other files removed:
all db types from /datadict except postgres and mysql
all db types from /drivers except postgres and the non-deprecated mysql driver
/docs directory
\ No newline at end of file
- escaping names when showing table / index in adodb-mysqli.inc.php(08939ca25acddff39b132e4bd823668b98447947)
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Latest version is available at http://adodb.org/
......@@ -120,7 +120,7 @@ class ADODB_Active_Record {
// php5 constructor
function __construct($table = false, $pkeyarr=false, $db=false)
{
global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS;
global $_ADODB_ACTIVE_DBS;
if ($db == false && is_object($pkeyarr)) {
$db = $pkeyarr;
......@@ -374,7 +374,7 @@ class ADODB_Active_Record {
// update metadata
function UpdateActiveTable($pkeys=false,$forceUpdate=false)
{
global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS;
global $_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS;
global $ADODB_ACTIVE_DEFVALS,$ADODB_FETCH_MODE;
$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
......@@ -463,8 +463,8 @@ class ADODB_Active_Record {
$attr = array();
$keys = array();
switch($ADODB_ASSOC_CASE) {
case 0:
switch (ADODB_ASSOC_CASE) {
case ADODB_ASSOC_CASE_LOWER:
foreach($cols as $name => $fldobj) {
$name = strtolower($name);
if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value)) {
......@@ -480,7 +480,7 @@ class ADODB_Active_Record {
}
break;
case 1:
case ADODB_ASSOC_CASE_UPPER:
foreach($cols as $name => $fldobj) {
$name = strtoupper($name);
......@@ -927,8 +927,6 @@ class ADODB_Active_Record {
// returns 0 on error, 1 on update, 2 on insert
function Replace()
{
global $ADODB_ASSOC_CASE;
$db = $this->DB();
if (!$db) {
return false;
......@@ -968,14 +966,17 @@ class ADODB_Active_Record {
$pkey = array($pkey);
}
if ($ADODB_ASSOC_CASE == 0) {
foreach($pkey as $k => $v)
$pkey[$k] = strtolower($v);
}
elseif ($ADODB_ASSOC_CASE == 1) {
foreach($pkey as $k => $v) {
$pkey[$k] = strtoupper($v);
}
switch (ADODB_ASSOC_CASE) {
case ADODB_ASSOC_CASE_LOWER:
foreach ($pkey as $k => $v) {
$pkey[$k] = strtolower($v);
}
break;
case ADODB_ASSOC_CASE_UPPER:
foreach ($pkey as $k => $v) {
$pkey[$k] = strtoupper($v);
}
break;
}
$ok = $db->Replace($this->_table,$arr,$pkey);
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Latest version is available at http://adodb.org/
......@@ -137,7 +137,7 @@ class ADODB_Active_Record {
// if $options['new'] is true, we forget all relations
function __construct($table = false, $pkeyarr=false, $db=false, $options=array())
{
global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS;
global $_ADODB_ACTIVE_DBS;
if ($db == false && is_object($pkeyarr)) {
$db = $pkeyarr;
......@@ -410,7 +410,7 @@ class ADODB_Active_Record {
// update metadata
function UpdateActiveTable($pkeys=false,$forceUpdate=false)
{
global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS;
global $_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS;
global $ADODB_ACTIVE_DEFVALS, $ADODB_FETCH_MODE;
$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
......@@ -491,8 +491,8 @@ class ADODB_Active_Record {
$attr = array();
$keys = array();
switch($ADODB_ASSOC_CASE) {
case 0:
switch (ADODB_ASSOC_CASE) {
case ADODB_ASSOC_CASE_LOWER:
foreach($cols as $name => $fldobj) {
$name = strtolower($name);
if ($ADODB_ACTIVE_DEFVALS && isset($fldobj->default_value)) {
......@@ -508,7 +508,7 @@ class ADODB_Active_Record {
}
break;
case 1:
case ADODB_ASSOC_CASE_UPPER:
foreach($cols as $name => $fldobj) {
$name = strtoupper($name);
......@@ -1060,8 +1060,6 @@ class ADODB_Active_Record {
// returns 0 on error, 1 on update, 2 on insert
function Replace()
{
global $ADODB_ASSOC_CASE;
$db = $this->DB();
if (!$db) {
return false;
......@@ -1097,7 +1095,7 @@ class ADODB_Active_Record {
}
switch ($ADODB_ASSOC_CASE == 0) {
switch (ADODB_ASSOC_CASE) {
case ADODB_ASSOC_CASE_LOWER:
foreach($pkey as $k => $v) {
$pkey[$k] = strtolower($v);
......
......@@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1;
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/**
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
......@@ -6,7 +6,7 @@ global $ADODB_INCLUDED_LIB;
$ADODB_INCLUDED_LIB = 1;
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......@@ -212,172 +212,103 @@ function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_
return ($rs) ? 2 : 0;
}
// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM
function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false,
$size=0, $selectAttr='',$compareFields0=true)
{
$hasvalue = false;
global $ADODB_FETCH_MODE;
if (is_array($name))
{
/*
* Reserved for future use
*/
}
if ($multiple or is_array($defstr)) {
if ($size==0) $size=5;
$attr = ' multiple size="'.$size.'"';
if (!strpos($name,'[]')) $name .= '[]';
} else if ($size) $attr = ' size="'.$size.'"';
else $attr ='';
$s = _adodb_getmenu_select($name, $defstr, $blank1stItem, $multiple, $size, $selectAttr);
$s = '<select name="'.$name.'"'.$attr.' '.$selectAttr.'>';
if ($blank1stItem)
{
if (is_string($blank1stItem)) {
$barr = explode(':',$blank1stItem);
if (sizeof($barr) == 1) $barr[] = '';
$s .= "\n<option value=\"".$barr[0]."\">".$barr[1]."</option>";
}
else
$s .= "\n<option></option>";
$hasvalue = $zthis->FieldCount() > 1;
if (!$hasvalue) {
$compareFields0 = true;
}
if ($zthis->FieldCount() > 1) $hasvalue=true;
else $compareFields0 = true;
$value = '';
$optgroup = null;
$firstgroup = true;
$fieldsize = $zthis->FieldCount();
while(!$zthis->EOF) {
$zval = rtrim(reset($zthis->fields));
if ($blank1stItem && $zval=="") {
if ($blank1stItem && $zval == "") {
$zthis->MoveNext();
continue;
}
$myFields = array_map('trim',array_values($zthis->fields));
if ($fieldsize > 1) {
if (isset($myFields[1]))
$zval2 = $myFields[1];
else
$zval2 = next($myFields);
if ($hasvalue) {
if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC) {
// Get 2nd field's value regardless of its name
$zval2 = current(array_slice($zthis->fields, 1, 1));
} else {
// With NUM or BOTH fetch modes, we have a numeric index
$zval2 = $zthis->fields[1];
}
$zval2 = trim($zval2);
$value = 'value="' . htmlspecialchars($zval2) . '"';
}
$selected = ($compareFields0) ? $zval : $zval2;
if ($hasvalue)
$value = " value='".htmlspecialchars($zval2)."'";
if (is_array($defstr))
{
$s .= _adodb_getmenu_option($defstr, $compareFields0 ? $zval : $zval2, $value, $zval);
if (in_array($selected,$defstr))
$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
else
$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
}
else {
if (strcasecmp($selected,$defstr)==0)
$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
else
$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
}
$zthis->MoveNext();
} // while
return $s ."\n</select>\n";
}
// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM
function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false,
$size=0, $selectAttr='',$compareFields0=true)
{
$hasvalue = false;
if (is_array($name))
{
/*
* Reserved for future use
*/
}
if ($multiple or is_array($defstr)) {
if ($size==0) $size=5;
$attr = ' multiple size="'.$size.'"';
if (!strpos($name,'[]')) $name .= '[]';
} else if ($size) $attr = ' size="'.$size.'"';
else $attr ='';
global $ADODB_FETCH_MODE;
$s = '<select name="'.$name.'"'.$attr.' '.$selectAttr.'>';
if ($blank1stItem)
if (is_string($blank1stItem)) {
$barr = explode(':',$blank1stItem);
if (sizeof($barr) == 1) $barr[] = '';
$s .= "\n<option value=\"".$barr[0]."\">".$barr[1]."</option>";
} else $s .= "\n<option></option>";
$s = _adodb_getmenu_select($name, $defstr, $blank1stItem, $multiple, $size, $selectAttr);
if ($zthis->FieldCount() > 1) $hasvalue=true;
else $compareFields0 = true;
$hasvalue = $zthis->FieldCount() > 1;
$hasgroup = $zthis->FieldCount() > 2;
if (!$hasvalue) {
$compareFields0 = true;
}
$value = '';
$optgroup = null;
$firstgroup = true;
$fieldsize = sizeof($zthis->fields);
while(!$zthis->EOF) {
$zval = rtrim(reset($zthis->fields));
$group = '';
if ($blank1stItem && $zval=="") {
$zthis->MoveNext();
continue;
}
$myFields = array_map('trim',array_values($zthis->fields));
if ($fieldsize > 1) {
if (isset($myFields[1]))
$zval2 = $myFields[1];
else
$zval2 = next($myFields);
}
$selected = ($compareFields0) ? $zval : $zval2;
$group = '';
if (isset($myFields[2])) {
$group = $myFields[2];
if ($hasvalue) {
if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC) {
// Get 2nd field's value regardless of its name
$fields = array_slice($zthis->fields, 1);
$zval2 = current($fields);
if ($hasgroup) {
$group = trim(next($fields));
}
} else {
// With NUM or BOTH fetch modes, we have a numeric index
$zval2 = $zthis->fields[1];
if ($hasgroup) {
$group = trim($zthis->fields[2]);
}
}
$zval2 = trim($zval2);
$value = "value='".htmlspecialchars($zval2)."'";
}
if ($optgroup != $group) {
$optgroup = $group;
if ($firstgroup) {
$firstgroup = false;
$s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
} else {
$s .="\n</optgroup>";
$s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
}
$s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
}
if ($hasvalue)
$value = " value='".htmlspecialchars($zval2)."'";
if (is_array($defstr)) {
$s .= _adodb_getmenu_option($defstr, $compareFields0 ? $zval : $zval2, $value, $zval);
if (in_array($selected,$defstr))
$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
else
$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
}
else {
if (strcasecmp($selected,$defstr)==0)
$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
else
$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
}
$zthis->MoveNext();
} // while
......@@ -388,6 +319,78 @@ function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multipl
return $s ."\n</select>\n";
}
/**
* Generate the opening SELECT tag for getmenu functions.
*
* ADOdb internal function, used by _adodb_getmenu() and _adodb_getmenu_gp().
*
* @param string $name
* @param string $defstr
* @param bool $blank1stItem
* @param bool $multiple
* @param int $size
* @param string $selectAttr
*
* @return string HTML
*/
function _adodb_getmenu_select($name, $defstr = '', $blank1stItem = true,
$multiple = false, $size = 0, $selectAttr = '')
{
if ($multiple || is_array($defstr)) {
if ($size == 0 ) {
$size = 5;
}
$attr = ' multiple size="' . $size . '"';
if (!strpos($name,'[]')) {
$name .= '[]';
}
} elseif ($size) {
$attr = ' size="' . $size . '"';
} else {
$attr = '';
}
$html = '<select name="' . $name . '"' . $attr . ' ' . $selectAttr . '>';
if ($blank1stItem) {
if (is_string($blank1stItem)) {
$barr = explode(':',$blank1stItem);
if (sizeof($barr) == 1) {
$barr[] = '';
}
$html .= "\n<option value=\"" . $barr[0] . "\">" . $barr[1] . "</option>";
} else {
$html .= "\n<option></option>";
}
}
return $html;
}
/**
* Print the OPTION tags for getmenu functions.
*
* ADOdb internal function, used by _adodb_getmenu() and _adodb_getmenu_gp().
*
* @param string $defstr Default values
* @param string $compare Value to compare against defaults
* @param string $value Ready-to-print `value="xxx"` (or empty) string
* @param string $display Display value
*
* @return string HTML
*/
function _adodb_getmenu_option($defstr, $compare, $value, $display)
{
if ( is_array($defstr) && in_array($compare, $defstr)
|| !is_array($defstr) && strcasecmp($compare, $defstr) == 0
) {
$selected = ' selected="selected"';
} else {
$selected = '';
}
return "\n<option $value$selected>" . htmlspecialchars($display) . '</option>';
}
/*
Count the number of records this sql statement will return by using
query rewriting heuristics...
......
......@@ -11,7 +11,7 @@ if (empty($ADODB_INCLUDED_CSV)) include_once(ADODB_DIR.'/adodb-csvlib.inc.php');
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
......@@ -4,7 +4,7 @@ ADOdb Date Library, part of the ADOdb abstraction library
Latest version is available at http://adodb.org/
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
......
This diff is collapsed.
<?php
/**
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/**
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......@@ -669,7 +669,7 @@ class ADODB_postgres64 extends ADOConnection{
while ($row = $rs->FetchRow()) {
$columns = array();
foreach (explode(' ', $row[2]) as $col) {
if (isset($col_names[$col])) {
if (isset($col_names[$col])) {
$columns[] = $col_names[$col];
}
}
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......@@ -322,7 +322,7 @@ class ADORecordSet_postgres7 extends ADORecordSet_postgres64{
$this->_currentRow++;
if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
if ($this->fields!==FALSE) {
if (isset($this->_blobArr)) $this->_fixblobs();
return true;
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......@@ -20,6 +20,12 @@ class ADODB_postgres8 extends ADODB_postgres7
{
var $databaseType = 'postgres8';
// From PostgreSQL 8.0 onwards, the adsrc column used in earlier versions to
// retrieve the default value is obsolete and should not be used (see #562).
var $metaDefaultsSQL = "SELECT d.adnum as num, pg_get_expr(d.adbin, d.adrelid) as def
FROM pg_attrdef d, pg_class c
WHERE d.adrelid=c.oid AND c.relname='%s'
ORDER BY d.adnum";
/**
* Retrieve last inserted ID
......
<?php
/*
@version v5.20.14 06-Jan-2019
@version v5.20.16 12-Jan-2020
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019
* @version v5.20.16 12-Jan-2020
* @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
* @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
* Released under both BSD license and Lesser GPL library license.
......
<?php
/**
* @version v5.20.14 06-Jan-2019