From: hickert Date: Fri, 18 Apr 2008 11:53:31 +0000 (+0000) Subject: Fixed FAI release creation. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e1fbf6b203df08dcb96d64b50c474f165520c6a8;p=gosa.git Fixed FAI release creation. -Fixed name checks, to avoid creation of releases with '/' in their name. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10555 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index e1b123ad2..651797131 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -528,8 +528,8 @@ class faiManagement extends plugin $base= $this->fai_base; /* Check used characters */ - if(preg_match("/[^0-9a-z \ö\ä\ü\.-_:,]/i",$name)){ - msg_dialog::display(_("Error"), msgPool::invalid(_("Name"),$name,"/[0-9a-z \ö\ä\ü\.-_:,]/i"), ERROR_DIALOG); + if(!preg_match("/^[0-9a-z \ö\ä\ü\.\-_:,]*$/i",$name)){ + msg_dialog::display(_("Error"), msgPool::invalid(_("Name"),$name,"/[0-9a-z \ö\ä\ü\.\-_:,]/i"), ERROR_DIALOG); $is_ok = false; } @@ -719,7 +719,7 @@ class faiManagement extends plugin if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){ if(($s_action == "freeze_branch")||($this->dispNewFreeze)){ if(!$this->acl_is_createable()){ - msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG); + msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG); }else{ $this->dispNewFreeze = true; $smarty->assign("iframe",false);