mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
save prefs DB error message added, e_model - another 'data has changed' fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* e107 Preference Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
|
||||
* $Revision: 1.13 $
|
||||
* $Date: 2009-08-27 23:03:34 $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2009-08-27 23:37:24 $
|
||||
* $Author: secretr $
|
||||
*/
|
||||
|
||||
@@ -508,7 +508,12 @@ class e_pref extends e_model
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//TODO - DB error messages
|
||||
elseif(e107::getDb()->mySQLlastErrNum)
|
||||
{
|
||||
$emessage->add('mySQL error #'.e107::getDb()->$mySQLlastErrNum.': '.e107::getDb()->mySQLlastErrText, E_MESSAGE_ERROR, $session_messages);
|
||||
$emessage->add('Settings not saved.', E_MESSAGE_ERROR, $session_messages);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($this->isError())
|
||||
|
Reference in New Issue
Block a user