summaryrefslogtreecommitdiff
path: root/drivers/adodb-postgres7.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/adodb-postgres7.inc.php')
-rw-r--r--drivers/adodb-postgres7.inc.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/adodb-postgres7.inc.php b/drivers/adodb-postgres7.inc.php
index 5a975797..2ff70157 100644
--- a/drivers/adodb-postgres7.inc.php
+++ b/drivers/adodb-postgres7.inc.php
@@ -358,22 +358,25 @@ class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{
return (is_array($this->fields));
}
- // Create associative array
+ /**
+ * Convert case of field names associative array, if needed
+ * @return void
+ */
function _updatefields()
{
- if (ADODB_ASSOC_CASE == 2) return; // native
+ $fn_change_case = $this->AssocCaseConvertFunction();
+ if(!$fn_change_case) {
+ // No conversion needed
+ return;
+ }
$arr = array();
- $lowercase = (ADODB_ASSOC_CASE == 0);
foreach($this->fields as $k => $v) {
- if (is_integer($k)) $arr[$k] = $v;
- else {
- if ($lowercase)
- $arr[strtolower($k)] = $v;
- else
- $arr[strtoupper($k)] = $v;
+ if (!is_integer($k)) {
+ $k = $fn_change_case($k);
}
+ $arr[$k] = $v;
}
$this->fields = $arr;
}