X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_servRepositorySetup.inc;h=413410c564bb8673cbd07bd998d97aa1c50de2b1;hb=5f1f63cbff1a76de561e6e556342179ace8ca24e;hp=8fec23baad07671634fe52e988f494a63209d1a5;hpb=ec41d11684518dc02c72de7d60dc38a5bb1e4c89;p=gosa.git diff --git a/plugins/admin/systems/class_servRepositorySetup.inc b/plugins/admin/systems/class_servRepositorySetup.inc index 8fec23baa..413410c56 100644 --- a/plugins/admin/systems/class_servRepositorySetup.inc +++ b/plugins/admin/systems/class_servRepositorySetup.inc @@ -2,11 +2,6 @@ class servRepositorySetup extends plugin { - /* CLI vars */ - var $cli_summary = "Manage FAI repositories"; - 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("Release","ParentServer","Url","cn"); @@ -61,7 +56,24 @@ class servRepositorySetup extends plugin $smarty= get_smarty(); if((isset($_POST['AddSection']))&&(isset($_POST['SectionName']))&&(!empty($_POST['SectionName']))){ - $this->Sections[$_POST['SectionName']]=$_POST['SectionName']; + + /* Replace multiple spaces with a single, and cut of white spaces (trim)*/ + $val = preg_replace("/\ \ * /" , " ", trim($_POST['SectionName'])); + + /* check if there are more than one entry given ( "section1 section2 )*/ + if(preg_match("/ /",$val)){ + + /* Generate list of new section names */ + $vals = split(" ",$val); + + /* Add new entries */ + foreach($vals as $entry){ + $entry = trim($entry); + $this->Sections[$entry]=$entry; + } + }else{ + $this->Sections[$val]=$val; + } } foreach($_POST as $name => $value){