index 78429e35b1957da9735565c9671e73126fa1e6c7..d7012296e3fe621e012fd14cfde02d81579263cf 100644 (file)
plugin::plugin ($config, $dn);
$this->types = array("NFS"=>"NFS","samba"=>"samba","NCP"=>"NCP");
$this->charsets = array("UTF-8" => "UTF-8",
- "ISO8859-1"=>"ISO8859-1 (Latin 1)",
- "ISO8859-2"=>"ISO8859-2 (Latin 2)",
- "ISO8859-3"=>"ISO8859-3 (Latin 3)",
- "ISO8859-4"=>"ISO8859-4 (Latin 4)",
- "ISO8859-5"=>"ISO8859-5 (Latin 5)");
+ "ISO8859-1"=>"ISO8859-1 (Latin 1)",
+ "ISO8859-2"=>"ISO8859-2 (Latin 2)",
+ "ISO8859-3"=>"ISO8859-3 (Latin 3)",
+ "ISO8859-4"=>"ISO8859-4 (Latin 4)",
+ "ISO8859-5"=>"ISO8859-5 (Latin 5)",
+ "cp850"=>"CP850 (Europe)");
if($entry){
$tmp = split("\|",$entry);
$this->option = $tmp[5]; // Options
$this->is_edit = true;
}else{
- $this->attributes[] = "name";
+ $this->attributes[] = "name";
}
}
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Fill templating stuff */
$smarty= get_smarty();
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
}
-
+
$smarty->assign("nameACL","");
+ $smarty->assign("name",$this->name);
if($this->is_edit){
$smarty->assign("nameACL"," disabled ");
- $smarty->assign("name","");
}
$display= $smarty->fetch(get_template_path('servnfs.tpl', TRUE));
if(empty($this->path)){
$message[]=_("Please specify a valid path for your setup.");
}
-
+
// only 0-9a-z
if(!$this->is_edit){
if(preg_match("/[^a-z0-9]/i",$this->name)){
}
}
+ if(preg_match("/\|/",$this->description)){
+ $message[]=_("Description contains invalid characters.");
+ }
+
+ if(preg_match("/\|/",$this->path)){
+ $message[]=_("Path contains invalid characters.");
+ }
+
+ if(preg_match("/\|/",$this->option)){
+ $message[]=_("Option contains invalid characters.");
+ }
+
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->search("(objectClass=goShareServer)", array("goExportEntry"));
{
/* Everything seems perfect, lets
generate an new export Entry
- */
-
+ */
+
$s_return = "";
-
+
$s_return.= $this->name."|";
$s_return.= $this->description."|";
$s_return.= $this->type."|";