From a55d5bab5fbab8f34b9590033682f8a2bafa7fea Mon Sep 17 00:00:00 2001 From: psc Date: Fri, 2 Oct 2009 15:55:53 +0000 Subject: [PATCH] Make error message more specific on where the error is. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14500 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 b095c10c0..371957ab6 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 @@ -184,8 +184,13 @@ class servnfs extends plugin $message[]= _("'Path / Volume' must be of format 'server:port'!"); } } elseif ($this->type == "CIFS" || $this->type == "samba") { - if (!preg_match("/[a-z0-9%\/_.+-]+[\$]*$/i", $this->path)) { - $message[] = _("'$' is only allowed at the end of the share name for hidden shares"); + if (!preg_match("/^[a-z0-9%\/_.+-]+[\$]*$/i", $this->path)) { + if (preg_match("/\$/", $this->path) && !preg_match("/^[^\$]+[\$]*$/", $this->path)) { + $message[] = _("'$' is only allowed at the end of the share name for hidden shares"); + } + else { + $message[] = msgPool::invalid(_("Path"),$this->path,"/[a-z0-9\$%\/_.+-]+[\$]*$/i"); + } } } else { if (!tests::is_path($this->path)){ -- 2.30.2