From c7dddd2b3a001400617415f6c670ab21f5ce4390 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 14 Mar 2008 10:14:56 +0000 Subject: [PATCH] msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9817 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/services/nfs/class_servNfs.inc | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc b/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc index 942c1ce0f..8b723c4f6 100644 --- a/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc +++ b/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc @@ -174,35 +174,34 @@ class servnfs extends plugin /* Call common method to give check the hook */ $message= plugin::check(); - // fixme : a check for the path ? ? if(empty($this->path)){ - $message[]=_("Please specify a valid path for your setup."); + $message[]= msgPool::required(_("Path")); + } + + if(!test::is_path($this->path)){ + $message[]= msgPool::invalid(_("Path")) } // only 0-9a-z if(!$this->is_edit){ - if(!preg_match("/^[a-z0-9\._äüö]*$/ui",$this->name)){ - $message[]=_("Please specify a valid name for your share."); - } if(empty($this->name)){ - $message[]=_("Please specify a name for your share."); + $message[]= msgPool::required(_("Name")); + } + if(!preg_match("/^[a-z0-9\._äüö]*$/ui",$this->name)){ + $message[]= msgPool::invalid(_("Name"),$this->name,"/[a-z0-9\._äüö]/ui"); } } if(!empty($this->description) && preg_match("/^[^a-z0-9\._äüö\+ -]*$/ui",$this->description)){ - $message[]=_("Description contains invalid characters."); + $message[]= msgPool::invalid(_("Description"),$this->description,"/^[a-z0-9\._äüö\+ -]*$/ui"); } if(!empty($this->volume) && preg_match("/^[^a-z0-9\._äüö\+ -]*$/ui",$this->volume)){ - $message[]=_("Volume contains invalid characters."); - } - - if(preg_match("/\|/",$this->path)){ - $message[]=_("Path contains invalid characters."); + $message[]= msgPool::invalid(_("Volume"),$this->volume,"/^[a-z0-9\._äüö\+ -]*$/ui"); } if(!empty($this->option) && preg_match("/^[^a-z0-9\._äüö,=\+ -]*$/ui",$this->option)){ - $message[]=_("Option contains invalid characters."); + $message[]= msgPool::invalid(_("Option"),$this->option,"/^[a-z0-9\._äüö\+ -]*$/ui"); } /* remove a / at the end of the path, we neither need it there nor -- 2.30.2