From e43bc5333ec5057d812cc7cdea5a4e2a10ae0e7c Mon Sep 17 00:00:00 2001 From: secretr Date: Mon, 19 Mar 2012 17:20:24 +0000 Subject: [PATCH] models - return false on validation error --- e107_handlers/model_class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 450fc62cc..0dd6681e3 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -2514,7 +2514,8 @@ class e_front_model extends e_model { $this->_db_errno = 0; $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); return 0; @@ -2734,7 +2735,8 @@ class e_admin_model extends e_front_model { $this->_db_errno = 0; $this->_db_errmsg = ''; - if($this->hasError() || (!$this->data_has_changed && !$force)) + if($this->hasError()) return false; + if(!$this->data_has_changed && !$force) { return 0; }