1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 08:06:38 +02:00

save prefs DB error message added, e_model - another 'data has changed' fix

This commit is contained in:
secretr
2009-08-27 23:37:24 +00:00
parent 4418d94cd0
commit c9d5a940bd
2 changed files with 14 additions and 9 deletions

View File

@@ -9,8 +9,8 @@
* e107 Base Model
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
* $Revision: 1.2 $
* $Date: 2009-08-21 22:17:59 $
* $Revision: 1.3 $
* $Date: 2009-08-27 23:37:24 $
* $Author: secretr $
*/
@@ -707,7 +707,7 @@ class e_model
//data has changed - optimized
if('_data' === $data_src && !$this->data_has_changed)
{
$this->data_has_changed = (isset($this->_data[$key]) && $this->_data[$key] != $value);
$this->data_has_changed = (!isset($this->_data[$key]) || $this->_data[$key] != $value);
}
$this->_parsed_keys[$data_src.'/'.$key] = $value;
$data = $value;
@@ -721,7 +721,7 @@ class e_model
}
if('_data' === $data_src && !$this->data_has_changed)
{
$this->data_has_changed = (isset($this->_data[$key]) && $this->{$data_src}[$key] != $value);
$this->data_has_changed = (!isset($this->_data[$key]) || $this->{$data_src}[$key] != $value);
}
$this->{$data_src}[$key] = $value;
}
@@ -746,7 +746,7 @@ class e_model
//data has changed
if('_data' === $data_src && !$this->data_has_changed)
{
$this->data_has_changed = (isset($this->_data[$key]) && $this->_data[$key] != $value);
$this->data_has_changed = (!isset($this->_data[$key]) || $this->_data[$key] != $value);
}
$this->{$data_src}[$key] = $value;
return $this;
@@ -756,7 +756,7 @@ class e_model
{
if('_data' === $data_src && !$this->data_has_changed)
{
$this->data_has_changed = (isset($this->_data[$key]) && $this->_data[$key] != $value);
$this->data_has_changed = (!isset($this->_data[$key]) || $this->_data[$key] != $value);
}
$this->{$data_src}[$key] = $value;
}