summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weber2007-09-04 13:28:34 +0000
committerChristian Weber2007-09-04 13:28:34 +0000
commit79d64a1641a7ac0c2356a0cdeda7f33b33d2c27c (patch)
tree6d3a499ab2d6323a6b9c7c1cfd240aeb0d8c656b
parenta8c1c6d5eae93faea5a6aeff33f8ae56c14e3fa2 (diff)
downloaditools-79d64a1641a7ac0c2356a0cdeda7f33b33d2c27c.tar.gz
itools-79d64a1641a7ac0c2356a0cdeda7f33b33d2c27c.tar.bz2
itools-79d64a1641a7ac0c2356a0cdeda7f33b33d2c27c.zip
add warning if member vars would influence update/insert (deprecated behaviour)
-rw-r--r--it_dbi.class6
1 files changed, 5 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index de5d13a..16fe7dc 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -175,11 +175,15 @@ function createclass($table)
*/
function _set(&$tags)
{
- # Add member vars to tags, considering unquoted fields
+ # DEPRECATED BEHAVIOUR: Add member vars to tags, considering unquoted fields
foreach (get_object_vars($this) as $field => $value)
# Don't use isset($tags[$field]) (would not handle null values correctly)
if (isset($this->_fields[$field]) && !array_key_exists('-'.$field, $tags) && !array_key_exists($field, $tags))
+ {
$tags[$field] = $value;
+ if ($this->_data && ($value != $this->_data[$field]))
+ it::error("it_dbi::_set() would take value '$value' from this->$field:" . D($_this));
+ }
# Create SQL
$r = array();