From: hickert Date: Fri, 8 Dec 2006 06:35:30 +0000 (+0000) Subject: Remove , if it is the last char in given people_ou. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5f208442356fa4c7fcd1275f9cf259c4a9b871c5;p=gosa.git Remove , if it is the last char in given people_ou. If someone enters something like this people='ou=people,' Several errors will be the result. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5345 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_config.inc b/include/class_config.inc index 0672d0704..ffa4f7d71 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -240,6 +240,11 @@ class config { if (!isset($this->current['GROUPS'])){ $this->current['GROUPS']= "ou=groups"; } + + /* Remove possibly added ',' from end of group and people ou */ + $this->current['GROUPS'] = preg_replace("/,*$/","",$this->current['GROUPS']); + $this->current['PEOPLE'] = preg_replace("/,*$/","",$this->current['PEOPLE']); + if (!isset($this->current['WINSTATIONS'])){ $this->current['WINSTATIONS']= "ou=winstations,ou=systems"; }