From 1066ff26bf5769ebc9aa116adb74ec4da463fc08 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 27 Sep 2007 09:35:45 +0000 Subject: [PATCH] Ensure that release department exists, while new branch is created git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7421 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiManagement.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 805927609..6e86f8e4e 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -412,6 +412,17 @@ class faiManagement extends plugin $appsrc = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=apps,",$baseToUse); $appdst = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=apps,","ou=".$name.",".$baseToUse) ; + /* Check if source depeartments exist */ + foreach(array($baseToUse,$appsrc) as $dep){ + $ldap->cd($this->config->current['BASE']); + $ldap->cat($dep); + if(!$ldap->count()){ + $ldap->create_missing_trees($dep); + } + } + + + /* Print out html introduction */ echo ' -- 2.30.2