summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f44fcb)
raw | patch | inline | side by side (parent: 6f44fcb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 5 May 2006 04:58:10 +0000 (04:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 5 May 2006 04:58:10 +0000 (04:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3203 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index b9e54e3ca91d5b985bc3614a26b22f8f8f8e4695..6d0343adee3c9f16bab1eb62c7ded13d378cdd8d 100644 (file)
}
/* Validate and modify - or: spaghetti rules! */
- if ($this->ou == "incoming"){
- $message[]= _("The field 'Name' contains the reserved word 'incoming'.".
- " Please choose another name.");
+ $SkipNames = array( "incoming","apps","systems","fai","config",
+ preg_replace("/ou=(.*),/","\\1",get_people_ou()),
+ preg_replace("/ou=(.*),/","\\1",get_groups_ou())
+ );
+ foreach($SkipNames as $name){
+ if ($this->ou == $name){
+ $message[]= sprintf(_("The field 'Name' contains the reserved word '%s'. Please choose another name."),$name);
+ }
}
+
+
if (preg_match ('/[#+:=>\\\\\/]/', $this->ou)){
$message[]= _("The field 'Name' contains invalid characters.");
}