mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
models - return false on validation error
This commit is contained in:
@@ -2514,7 +2514,8 @@ class e_front_model extends e_model
|
|||||||
{
|
{
|
||||||
$this->_db_errno = 0;
|
$this->_db_errno = 0;
|
||||||
$this->_db_errmsg = '';
|
$this->_db_errmsg = '';
|
||||||
if($this->hasError() || (!$this->data_has_changed && !$force))
|
if($this->hasError()) return false;
|
||||||
|
if(!$this->data_has_changed && !$force)
|
||||||
{
|
{
|
||||||
$this->addMessageInfo(LAN_NO_CHANGE);
|
$this->addMessageInfo(LAN_NO_CHANGE);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -2734,7 +2735,8 @@ class e_admin_model extends e_front_model
|
|||||||
{
|
{
|
||||||
$this->_db_errno = 0;
|
$this->_db_errno = 0;
|
||||||
$this->_db_errmsg = '';
|
$this->_db_errmsg = '';
|
||||||
if($this->hasError() || (!$this->data_has_changed && !$force))
|
if($this->hasError()) return false;
|
||||||
|
if(!$this->data_has_changed && !$force)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user