diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc
index 727082d23c76a7f22ff42e3ee9481e04f2522426..acc6ebf9dec2e2a3803490f04be06d54eda42fbc 100644 (file)
$this->handle_post_events("remove");
}
+ /* 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[]= _("Numerical value for Quota Setting is empty.");
+ }
+ else if ($_POST["quota_size"] <= 0){
+ $message[]= _("Numerical value for Quota Setting is not valid.");
+ }
+ }
+ }
+
+ return $message;
+ }
/* Save data to object */
function save_object()
/* Save quota values */
if (chkacl ($this->acl, "gosaProxyQuota") == ""){
$old= $this->gosaProxyQuota;
- $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"];
+ if(isset($_POST["quota_size"]) && isset($_POST["quota_unit"])){
+ $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"];
+ }
$this->is_modified= ($old != $this->gosaProxyQuota)?TRUE:$this->is_modified;
$old= $this->gosaProxyQuotaPeriod;
- $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"];
+ if(isset($_POST["gosaProxyQuotaPeriod"])){
+ $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"];
+ }
$this->is_modified= ($old != $this->gosaProxyQuotaPeriod)?TRUE:$this->is_modified;
}
}