From f1c8aca230a0fc982f98f3dfc9b630b82dbb7dc4 Mon Sep 17 00:00:00 2001 From: M Date: Sun, 6 Dec 2015 17:38:02 -0500 Subject: + Added functions to Master model for getting merged strings for all error/warning/or notice messages --- app/model/master.mod.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'app/model/master.mod.php') diff --git a/app/model/master.mod.php b/app/model/master.mod.php index 2570a8b..1ce9b9a 100644 --- a/app/model/master.mod.php +++ b/app/model/master.mod.php @@ -4,6 +4,38 @@ require_once "class/model.class.php"; class MasterModel extends Model { + /* + * Get string of all logged error messages + */ + function getErrorStr() + { + if (!$this->isError()) + return ""; + + return implode("
", $this->errorlist); + } + + /* + * Get string of all logged warning messages + */ + function getWarningStr() + { + if (!$this->isWarning()) + return ""; + + return implode("
", $this->warninglist); + } + + /* + * Get string of all logged notice messages + */ + function getNoticeStr() + { + if (!$this->isNotice()) + return ""; + + return implode("
", $this->noticelist); + } } ?> -- cgit v1.2.3