X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_servNfs.inc;h=9f6a3e93d211a23bd1d48f815c3ec16ea6a064fc;hb=c30fdf675865a86365275ed6fb9f8a0cc06e41af;hp=291a8570699aa8bee0e8a80f095e29d9ab0ecc7d;hpb=862b8342c04878aae8da193a145f1d06ae36b701;p=gosa.git diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index 291a85706..9f6a3e93d 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -2,11 +2,6 @@ class servnfs extends plugin { - /* CLI vars */ - var $cli_summary = "Manage server objects"; - var $cli_description = "Some longer text\nfor help"; - var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); - /* attribute list for save action */ var $ignore_account = TRUE; var $attributes = array("description","type","charset","path","option", "volume"); @@ -42,13 +37,13 @@ class servnfs extends plugin $this->charsets = array(); - if(!file_exists("/etc/gosa/encodings")){ - print_red(_("The file '/etc/gosa/encodings' does not exist, can't get supported charsets.")); + if(!file_exists(CONFIG_DIR."/encodings")){ + print_red(sprintf(_("The file '%s/encodings' does not exist, can't get supported charsets."),CONFIG_DIR)); }else{ - if(!is_readable("/etc/gosa/encodings")){ - print_red(_("Can't read '/etc/gosa/encodings', please check permissions.")); + if(!is_readable(CONFIG_DIR."/encodings")){ + print_red(sprintf(_("Can't read '%s/encodings', please check permissions."),CONFIG_DIR)); }else{ - $fp = fopen("/etc/gosa/encodings","r"); + $fp = fopen(CONFIG_DIR."/encodings","r"); $i = 100; while(!feof($fp)&&$i){ $i -- ; @@ -180,7 +175,7 @@ class servnfs extends plugin $message[]=_("Please specify a valid path for your setup."); } - // only 0-9a-z + // Skip if there are diallowed characters if(!$this->is_edit){ if(!preg_match("/^[a-z0-9\.\-_]+$/i",$this->name)){ $message[]=_("Please specify a valid name for your share."); @@ -190,11 +185,11 @@ class servnfs extends plugin } } - if(preg_match("/[^a-z0-9._+ \|-]+/i",$this->description)){ + if(preg_match("/[^a-z0-9\._+ -]+/i",$this->description)){ $message[]=_("Description contains invalid characters."); } - if(preg_match("/[^a-z0-9._+ |-]/i",$this->volume)){ + if(preg_match("/[^a-z0-9\._+ -]/i",$this->volume)){ $message[]=_("Volume contains invalid characters."); } @@ -202,7 +197,7 @@ class servnfs extends plugin $message[]=_("Path contains invalid characters."); } - if(preg_match("/[^a-z0-9._+ \|-]/i",$this->option)){ + if(preg_match("/[^a-z0-9\._,=+ -]/i",$this->option)){ $message[]=_("Option contains invalid characters."); }