From c028d693800966bc8cf0f104114ad7f3bb62b683 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 28 Jun 2006 11:33:15 +0000 Subject: [PATCH] Added gotoMimeType to fai release management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3960 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 4 ++-- plugins/admin/fai/class_faiManagement.inc | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index a319babbe..8b4130bad 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -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"){ diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 85c904909..917bbf539 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -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 "".$smarty->fetch(get_template_path('headers.tpl')); echo ""; @@ -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); -- 2.30.2