Code

Ensure that release department exists, while new branch is created
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Sep 2007 09:35:45 +0000 (09:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Sep 2007 09:35:45 +0000 (09:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7421 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiManagement.inc

index 8059276090bae60a7207cf6652b264f5e9e7d027..6e86f8e4e862d0078b4113d025cbdb38ba64a262 100644 (file)
@@ -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 '  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
         <html>