From 02c9ede119b7a0f4b98ca32633e74a6c3d44def7 Mon Sep 17 00:00:00 2001 From: secretr Date: Wed, 21 Oct 2009 11:57:15 +0000 Subject: [PATCH] more model errors cleanup --- e107_handlers/model_class.php | 6 +++--- e107_handlers/pref_class.php | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 06a98b752..f4e5a3def 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -9,8 +9,8 @@ * e107 Base Model * * $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $ - * $Revision: 1.13 $ - * $Date: 2009-10-21 10:24:32 $ + * $Revision: 1.14 $ + * $Date: 2009-10-21 11:57:15 $ * $Author: secretr $ */ @@ -1380,7 +1380,7 @@ class e_model_admin extends e_model */ public function hasError() { - return (!$this->hasValidationError() && !$this->hasSqlError()); + return ($this->hasValidationError() || $this->hasSqlError()); } /** diff --git a/e107_handlers/pref_class.php b/e107_handlers/pref_class.php index 27bf4107f..a0cadd2cc 100644 --- a/e107_handlers/pref_class.php +++ b/e107_handlers/pref_class.php @@ -9,8 +9,8 @@ * e107 Preference Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $ - * $Revision: 1.24 $ - * $Date: 2009-10-21 08:58:33 $ + * $Revision: 1.25 $ + * $Date: 2009-10-21 11:57:15 $ * $Author: secretr $ */ @@ -609,6 +609,15 @@ class e_pref extends e_model_admin return $this; } + /** + * Validation override + * @return + */ + public function validate() + { + return true; + } + /** * Clear preferences cache *