From 8866f8a6f579b3055de7d8d355afc2406f696aef Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 27 May 2005 14:59:42 +0000 Subject: [PATCH] Added check function to proxy plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@485 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_proxyAccount.inc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index 06a6c0090..ff4c45d37 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -116,6 +116,26 @@ class proxyAccount extends plugin } + /* Check values */ + function check() + { + $message= array(); + + /* We've got only one value to check for positive integer or emtpy field */ + if ($this->is_account){ + if (isset($_POST["quota_size"])){ + if ($_POST["quota_size"] == ""){ + $message[]= _("Value specified as 'Quota Size' is empty."); + } + else if ($_POST["quota_size"] <= 0){ + $message[]= _("Value specified as 'Quota Size' is not valid."); + } + } + } + + return $message; + } + /* Save data to object */ function save_object() { @@ -171,7 +191,6 @@ class proxyAccount extends plugin $this->is_modified= ($old != $this->gosaProxyQuotaPeriod)?TRUE:$this->is_modified; } } - } -- 2.30.2