From 0265839bcc847704def312cc3dfa659dafbeccbd Mon Sep 17 00:00:00 2001 From: psc Date: Tue, 29 Sep 2009 09:24:49 +0000 Subject: [PATCH] Allow the specification of hidden shares (indicated by a $ _at the end_ of the share name) by relaxing the check weither a share name is valid or not (Trac: #1960) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14383 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/services/nfs/class_servNfs.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc b/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc index 4e4f7238e..6540df2c4 100644 --- a/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc +++ b/trunk/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc @@ -198,8 +198,13 @@ class servnfs extends plugin if(empty($this->name)){ $message[]= msgPool::required(_("Name")); } - if(!preg_match("/^[a-z0-9\._äüö]*$/ui",$this->name)){ - $message[]= msgPool::invalid(_("Name"),$this->name,"/[a-z0-9\._äüö]/ui"); + if(!preg_match("/^[a-z0-9\._äüö\$]*$/ui",$this->name)){ + $message[]= msgPool::invalid(_("Name"),$this->name,"/[a-z0-9\._äüö]\$/ui"); + } + else { + if (!preg_match("/^[^\$].*\$$/", $this->name)) { + $message[] = _("Hidden shares must have the '$' at the end of the name!"); + } } } -- 2.30.2