Index: trunk/kernel/include/itemdb.php
===================================================================
diff -u -r842 -r869
--- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 842)
+++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 869)
@@ -163,7 +163,7 @@
if( !$this->HasField($name[$i]) || ($this->Data[$name[$i]] != $value[$i]))
{
if ($_GET['new'] != 1) {
- $this->DetectChanges($name, $value);
+ $this->DetectChanges($name[$i], $value[$value]);
}
$this->Data[$name[$i]] = $value[$i];
$this->m_dirtyFieldsMap[$name[$i]] = $value[$i];
@@ -308,6 +308,10 @@
return false;
}
+ if ($objSession->GetVariable("HasChanges") == 2) {
+ $objSession->SetVariable("HasChanges", 1);
+ }
+
/* if ($this->adodbConnection->Affected_Rows() > 0) {
$objSession->SetVariable("HasChanges", 1);
}*/
@@ -383,9 +387,11 @@
//print_pre($_POST);
//echo "$name: $value
";
if ($this->Data[$name] != $value && !strstr($name, 'Modif') && !strstr($name, 'Created')) {
- //echo "$name Modified ".$this->Data[$name]." $value
";
- if (!strstr($name, 'Hot') && !strstr($name, 'Pop')) {
- $objSession->SetVariable("HasChanges", 1);
+ //echo "$name Modified tt ".$this->Data[$name]." tt $value
";
+ if (!strstr($name, 'Hot') && !strstr($name, 'Pop') && !strstr($name, "Id") && !strstr($name, "ItemType")) {
+ if ($objSession->GetVariable("HasChanges") != 1) {
+ $objSession->SetVariable("HasChanges", 2);
+ }
}
}
}
@@ -412,9 +418,13 @@
$this->SetUniqueId($this->adodbConnection->Insert_ID());
+ if ($objSession->GetVariable("HasChanges") == 2) {
+ $objSession->SetVariable("HasChanges", 1);
+ }
+
/*if ($this->adodbConnection->Affected_Rows() > 0) {
$objSession->SetVariable("HasChanges", 1);
- } */
+ } */
return true;
}