Code

Added gotoMimeType to fai release management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Jun 2006 11:33:15 +0000 (11:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Jun 2006 11:33:15 +0000 (11:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3960 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc
plugins/admin/fai/class_faiManagement.inc

index a319babbe808523c53ac01ad1d3b7e777586485d..8b4130bad1727303d106075bf156ff51436454ff 100644 (file)
@@ -527,7 +527,7 @@ class LDAP{
 
           /* If this is no department */
           foreach($attr as $key => $value){
-            if(in_array($key ,array("FAItemplateFile","FAIscript", "gotoLogonScript", "gosaApplicationIcon"))){
+            if(in_array($key ,array("FAItemplateFile","FAIscript", "gotoLogonScript", "gosaApplicationIcon","gotoMimeIcon"))){
               $sr= ldap_read($this->cid, $this->fix($sourcedn), "$key=*", array($key));
               $ei= ldap_first_entry($this->cid, $sr);
               if ($tmp= @ldap_get_values_len($this->cid, $ei,$key)){
@@ -545,7 +545,7 @@ class LDAP{
           unset($attr['count']);
           unset($attr['dn']);
 
-          if(!in_array("gosaApplication" , $attr['objectClass'])){
+          if((!in_array("gosaApplication" , $attr['objectClass'])) && (!in_array("gotoMimeType", $attr['objectClass']))){
             if($type=="branch"){
               $attr['FAIstate'] ="branch";
             }elseif($type=="freeze"){
index 85c9049095e97660edaf0374281c7239efcc04c2..917bbf5395e4c384dea1976187c4b75a0fc4abfe 100644 (file)
@@ -370,6 +370,9 @@ 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) ; 
 
+      $mimesrc = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=mime,",$baseToUse); 
+      $mimedst = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=mime,","ou=".$name.",".$baseToUse) ; 
+
       /* Print header to have styles included */
       echo "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
       echo "<body style='background-image:none;margin:3px;color:black'>";
@@ -381,6 +384,13 @@ class faiManagement extends plugin
       $ldap->cd ($this->config->current['BASE']);
       $ldap->copy_FAI_resource_recursive($appsrc,$appdst,$NewReleaseName,$type,true);
 
+      /* Duplicate mime types 
+       */
+      $ldap->cd ($appdst);
+      $ldap->recursive_remove();
+      $ldap->cd ($this->config->current['BASE']);
+      $ldap->copy_FAI_resource_recursive($mimesrc,$mimedst,$NewReleaseName,$type,true);
+
       /* Duplicate fai objects 
        */
       $ldap->cd ("ou=".$name.",".$baseToUse);