summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorChristian Schneider2020-06-25 20:07:20 +0200
committerChristian Schneider2020-06-25 20:07:20 +0200
commit5555b40c2a126cecc1d85d992c6862e53fee1c60 (patch)
tree66f13a50367a37a69f6472c348e35cfed5a055a3 /it_dbi.class
parentb0d2c679c6dba0120fac924ee3e35e64b174d6e5 (diff)
downloaditools-5555b40c2a126cecc1d85d992c6862e53fee1c60.tar.gz
itools-5555b40c2a126cecc1d85d992c6862e53fee1c60.tar.bz2
itools-5555b40c2a126cecc1d85d992c6862e53fee1c60.zip
Streamline _read_postprocess: remove support for unset(), add support to postprocess localized fields, conversion of fields (e.g. int fields) is now done after read_postprocess
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class16
1 files changed, 2 insertions, 14 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 2c16b90..ceb5241 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -729,8 +729,8 @@ function iterate()
$this->_data[$field] = $value;
unset($this->_data['dyncols']);
- foreach ($this->_data as $field => $value)
- $this->$field = (isset($value) && $this->_convertfunc[$field]) ? ($this->_data[$field] = $this->_convertfunc[$field]($value)) : $value;
+ foreach (static::_read_postprocess($this->_data) as $field => $value)
+ $this->$field = $this->_data[$field] = (isset($value) && $this->_convertfunc[$field]) ? $this->_convertfunc[$field]($value) : $value;
if ($localizedfields)
{
@@ -762,18 +762,6 @@ function iterate()
$this->_result->close();
}
- if (is_array($this->_data))
- {
- $originalfields = array_keys($this->_data);
- $this->_data = static::_read_postprocess($this->_data, $this);
- # Remove fields which have been unset in _read_postprocess
- foreach (array_diff($originalfields, array_keys($this->_data)) as $field)
- unset($this->$field);
- # Update fields as they may have been changed in _read_postprocess
- foreach ($this->_data as $field => $value)
- $this->$field = $value;
- }
-
$this->_read_post_process();
}
else