Code

Allow the specification of hidden shares (indicated
[gosa.git] / trunk / gosa-plugins / goto / admin / systems / services / nfs / class_servNfs.inc
index 4e4f7238eb9cba5e0661d909468ec1225af1571a..6540df2c44b256833c5fb6c49c8cdf91bd51e5d0 100644 (file)
@@ -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!");
+        }
       }
     }