X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_servRepositorySetup.inc;h=a1c62e7baad9a62b52d3681d66f81a5dc41eb0ad;hb=96e561f68b807338f5f8923b665eb96376bd2f11;hp=4b885bbd90622fba704b992b2d4d69fea2b6ee0d;hpb=f9a3dec5529c89bd002b0add259a3d33d9bb41cd;p=gosa.git diff --git a/plugins/admin/systems/class_servRepositorySetup.inc b/plugins/admin/systems/class_servRepositorySetup.inc index 4b885bbd9..a1c62e7ba 100644 --- a/plugins/admin/systems/class_servRepositorySetup.inc +++ b/plugins/admin/systems/class_servRepositorySetup.inc @@ -61,7 +61,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){ @@ -166,8 +183,8 @@ class servRepositorySetup extends plugin if(!empty($cmd)){ $res = shell_exec($cmd); $res2 = trim($res); - if((!$res)){ - print_red(sprintf(_("Can't execute specified REPOSITORY_HOOK '%s' please check your gosa.conf."),$cmd)); + if(!$res){ + print_red(sprintf(_("Can't execute specified REPOSITORY_HOOK '%s'. Please check your gosa.conf."),$cmd)); }elseif(empty($res2)){ print_red(sprintf(_("The specified REPOSITORY_HOOK '%s', specified in your gosa.conf, returns an empty string."),$cmd)); }else{