From: hickert Date: Wed, 19 Dec 2007 09:41:24 +0000 (+0000) Subject: Added multiple edit checks to samba X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d0ae7bad66148d79dc25039bc547d50e54b9dd3;p=gosa.git Added multiple edit checks to samba git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8142 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc index 3a9cc0c28..3fb309566 100644 --- a/gosa-core/plugins/personal/samba/class_sambaAccount.inc +++ b/gosa-core/plugins/personal/samba/class_sambaAccount.inc @@ -1230,6 +1230,37 @@ class sambaAccount extends plugin } } + + function multiple_check() + { + $message = plugin::multiple_check(); + + /* Strings */ + foreach (array( "sambaHomePath" => _("Home directory"), + "sambaProfilePath" => _("Profile path")) as $key => $val){ + if (in_array($key,$this->multi_boxes) && !$this->mungedObject->is_samba_path($this->$key)){ + $message[]= sprintf(_("The value specified as '%s' contains invalid characters!"), $val); + } + } + + /* Numeric values */ + foreach (array( "CtxMaxConnectionTime" => _("Connection"), + "CtxMaxDisconnectionTime" => _("Disconnection"), + "CtxMaxIdleTime" => _("IDLE")) as $key => $val){ + if (in_array($key,$this->multi_boxes) && + isset($this->mungedObject->ctx[$key]) && + !is_id($this->mungedObject->ctx[$key]) && $val != 0){ + $message[]= sprintf(_("The timeout property '%s' is checked and contains invalid or no characters!"), $val); + } + } + + /* Too many workstations? Windows usrmgr only supports eight */ + if (substr_count($this->sambaUserWorkstations, ",") >= 8){ + $message[]= _("The windows user manager only allows eight clients. You've specified more than eight."); + } + return($message); + } + function get_multi_init_values() {