X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9a23a8c0a51b7ec38a96f525484134f3cb85dc7e..ebfd5af0ca598c2e86d27c23a3aaea9fa0505cf6:/WEB-INF/lib/form/ActionErrors.class.php diff --git a/WEB-INF/lib/form/ActionErrors.class.php b/WEB-INF/lib/form/ActionErrors.class.php index 44b2b2c0..a13104d7 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 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"]; } @@ -63,4 +59,3 @@ class ActionErrors { return $this->errors; } } -?> \ No newline at end of file