X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FActionErrors.class.php;h=1f8aceb3dba6f0063cc7f8e9bbd2e5bac5d7c6cd;hb=a07b6f8bccda226991ced6fe25f1c9c508e423e5;hp=04a6333f0db677277616b1b29e8c7b7f8529feec;hpb=33399ff6a8bdfe9b989810dafe9c4dbf3cf3b685;p=timetracker.git diff --git a/WEB-INF/lib/form/ActionErrors.class.php b/WEB-INF/lib/form/ActionErrors.class.php index 04a6333f..1f8aceb3 100644 --- a/WEB-INF/lib/form/ActionErrors.class.php +++ b/WEB-INF/lib/form/ActionErrors.class.php @@ -28,14 +28,18 @@ class ActionErrors { var $errors = array(); - - function ActionErrors() { + + function __construct() { } - - function isEmpty() { - return (count($this->errors)>0 ? false : true ); + + function no() { + return (count($this->errors)>0 ? false : true); } - + + function yes() { + return (count($this->errors)>0 ? true : false); + } + function add($message, $arg0 = '', $arg1 = '') { $patterns = array ("/\{0\}/","/\{1\}/"); $replace = array ($arg0, $arg1); @@ -43,14 +47,6 @@ class ActionErrors { $this->errors[]["message"] = $message; } - function addAll($arr) { - if (is_array($arr)) { - foreach ($arr as $k=>$v) { - $this->errors[$k] = $v; - } - } - } - function get($key) { return $this->errors["$key"]["message"]; }