Index: trunk/kernel/include/itemdb.php
===================================================================
diff -u -r836 -r838
--- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 836)
+++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 838)
@@ -153,16 +153,18 @@
}
function Set($name, $value)
- {
- //echo "Setting Field $name: = [$value]
";
+ {
+ //echo "Setting Field $name: = [$value]
";
if( is_array($name) )
{
for ($i=0; $i < sizeof($name); $i++)
{
$var = "m_" . $name[$i];
if( !$this->HasField($name[$i]) || ($this->Data[$name[$i]] != $value[$i]))
{
- $this->DetectChanges($name[$i], $value[$i]);
+ if ($_GET['new'] != 1) {
+ $this->DetectChanges($name, $value);
+ }
$this->Data[$name[$i]] = $value[$i];
$this->m_dirtyFieldsMap[$name[$i]] = $value[$i];
}
@@ -173,7 +175,9 @@
$var = "m_" . $name;
if( !$this->HasField($name) || $this->Data[$name] != $value )
{
- $this->DetectChanges($name, $value);
+ if ($_GET['new'] != 1) {
+ $this->DetectChanges($name, $value);
+ }
$this->Data[$name] = $value;
$this->m_dirtyFieldsMap[$name] = $value;
}