Code

Add possibility to add hiden shares
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 14:04:22 +0000 (14:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 14:04:22 +0000 (14:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14420 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc

index 105d9565db00261eca8d23d45608b98ad50171e0..07ca37b97f41f6d510f7422082fc60bd20b92977 100644 (file)
@@ -198,8 +198,12 @@ 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 a '$' at the end of the name!");
+        }
       }
     }