summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1f1c95)
raw | patch | inline | side by side (parent: e1f1c95)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 May 2010 05:29:38 +0000 (05:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 May 2010 05:29:38 +0000 (05:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18301 594d385d-05f5-0310-b6e9-bd551577e9d8
index b6ef2a6125cae94dd430be037d543df5d9b1cd45..6bb494aec212382a0431c06d2d5bd939b52162f0 100644 (file)
{
global $config;
- if(!preg_match("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",$dn)){
- $base = get_ou('faiBaseRDN').$dn;
+ if(!preg_match("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",$dn)){
+ $base = get_ou("faiManagement", "faiBaseRDN").$dn;
}else{
$base = $dn;
}
$ldap->search("(objectClass=FAIbranch)",array("ou","dn"));
while($attrs = $ldap->fetch()){
if($appendedName){
- $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou('faiBaseRDN'), '/').".*$/i","",$attrs['dn']));
+ $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').".*$/i","",$attrs['dn']));
}else{
$res[$attrs['dn']] = $attrs['ou'][0];
}
/* Dont't try to modify non FAIclasses
*/
- if(!preg_match("/[^,]+,".preg_quote(get_ou("faiBaseRDN"), '/')."/i",$obj_dn)){
+ if(!preg_match("/[^,]+,".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",$obj_dn)){
trigger_error("PLEASE check fai class handling in ".__LINE__." -> ".__FILE__);
echo "<br>-->".$Current_DN."<br>";
echo "<br>-->".$obj_dn."<br>";
$ldap->search("(objectClass=FAIbranch)",array("ou","FAIstate"));
while($attrs = $ldap->fetch()){
foreach($sub_releases as $sub_rel){
- if(preg_match("/^".preg_quote($sub_rel.get_ou('faiBaseRDN'), '/')."/i",$attrs['dn'])){
- $f_releases[$sub_rel.get_ou('faiBaseRDN')] = $attrs;
+ if(preg_match("/^".preg_quote($sub_rel.get_ou("faiManagement", "faiBaseRDN"), '/')."/i",$attrs['dn'])){
+ $f_releases[$sub_rel.get_ou("faiManagement", "faiBaseRDN")] = $attrs;
}
}
}
foreach($sub_releases as $name => $sub_rel){
$FAIstate = "";
- if(isset($f_releases[$sub_rel.get_ou('faiBaseRDN')]) && isset($f_releases[$sub_rel.get_ou('faiBaseRDN')]['FAIstate'])){
- $FAIstate = $f_releases[$sub_rel.get_ou('faiBaseRDN')]['FAIstate'][0];
+ if(isset($f_releases[$sub_rel.get_ou("faiManagement", "faiBaseRDN")]) && isset($f_releases[$sub_rel.get_ou("faiManagement", "faiBaseRDN")]['FAIstate'])){
+ $FAIstate = $f_releases[$sub_rel.get_ou("faiManagement", "faiBaseRDN")]['FAIstate'][0];
}
foreach($groups as $dn => $data){
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index d0e151712b77e0dcdf7a0194974dfbb8d25a94df..62694d82509717e383eb9a29b6eff7e2ef7d447a 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiHook", "faiHookRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiHook", "faiHookRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIhook",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 9041bb00d7d80a695e4d19e56db41f2c77c7945f..6574bb3f8f6f4465901c9637679fdbac715e8e19 100644 (file)
$this->opsi = new opsi($this->config);;
}
- $this->fai_base = get_ou("faiBaseRDN").$this->config->current['BASE'];
+ $this->fai_base = get_ou("faiManagement", "faiBaseRDN").$this->config->current['BASE'];
$cfg_rel = $this->config->get_cfg_value("faiManagement","defaultFaiRelease");
if(!empty($cfg_rel)){
$ldap->cd($bb);
$ldap->recursive_remove();
- $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("application", "applicationRDN"), $bb));
+ $ldap->cd(preg_replace('/,'.preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').'/i', ','.get_ou("application", "applicationRDN"), $bb));
$ldap->recursive_remove();
- $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("mimetype", "mimetypeRDN"), $bb));
+ $ldap->cd(preg_replace('/,'.preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').'/i', ','.get_ou("mimetype", "mimetypeRDN"), $bb));
$ldap->recursive_remove();
/* Search for all groups with configured application menus.
- The search für menu configuration for the specified release and collect all those dns.
- Remove entries
*/
- $release_ou = preg_replace("/".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$bb);
+ $release_ou = preg_replace("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').".*$/i","",$bb);
$ldap->cd($this->config->current['BASE']);
$ldap->search("(objectClass=posixGroup)",array("dn"));
$targetReleaseDN = "ou=".$name.",".$baseToUse;
- $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("application", "applicationRDN"),$baseToUse);
- $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("application", "applicationRDN"),"ou=".$name.",".$baseToUse) ;
+ $appsrc = preg_replace("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",get_ou("application", "applicationRDN"),$baseToUse);
+ $appdst = preg_replace("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",get_ou("application", "applicationRDN"),"ou=".$name.",".$baseToUse) ;
- $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("mimetype", "mimetypeRDN"),$baseToUse);
- $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("mimetype", "mimetypeRDN"),"ou=".$name.",".$baseToUse) ;
+ $mimesrc = preg_replace("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",get_ou("mimetype", "mimetypeRDN"),$baseToUse);
+ $mimedst = preg_replace("/".preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/')."/i",get_ou("mimetype", "mimetypeRDN"),"ou=".$name.",".$baseToUse) ;
/* Check if source depeartments exist */
foreach(array($baseToUse,$appsrc,$mimesrc) as $dep){
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 28631c25f52a513ad988771311d7fa0986b74360..933cbe0c9f57f3027bfd053befe6e91df798f71b 100644 (file)
/* Assemble release name */
$release = $this->parent->parent->fai_release;
- $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $release);
+ $tmp= preg_replace('/[,]*'.preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').'.*$/i', '', $release);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(explode(',', $tmp));
$this->FAIdebianRelease= "/";
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiPackage", "faiPackageRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiPackage", "faiPackageRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIpackageList",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
if($this->FAIdebianRelease == "ClearFromCopyPaste"){
$current_release = $this->parent->parent->fai_release;
- $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $current_release);
+ $tmp= preg_replace('/,'.preg_quote(get_ou("faiManagement", "faiBaseRDN"), '/').'.*$/i', '', $current_release);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(explode(',', $tmp));
$this->FAIdebianRelease= "";
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 6f3630e6e54c2b8768198af0294f2bce6530a997..342b6516013a911fe5668cc2169d6ccac46d6aae 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIpartitionTable",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 80908909fc2a86f7aa1b4c2757b555f07bda8be1..98940c170e430f3d3e410e4022387b1f977815c3 100644 (file)
*/
if($this->dn == "new" || $this->cn != $this->old_cn){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiProfile", "faiProfileRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiProfile", "faiProfileRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIprofile",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 8575e6f8fadb03e75c9a05c87191e628ee338a56..1c9f03edf1c4a23a78ed375b900186861025fd8b 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiScript", "faiScriptRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiScript", "faiScriptRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIscript",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index b370dd6c9dcb53f3ff5d4d0976c1d31707aeb031..635e5b826fee4168ac4995f6199f742b249d2fb0 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiTemplate", "faiTemplateRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiTemplate", "faiTemplateRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAItemplate",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index 9de8ee3123c4a89b9aec27c663fe99f0028c945c..8d35ca7311e35fae82f8c782290db94bb50c0a4c 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiVariable", "faiVariableRDN").get_ou('faiBaseRDN').$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou("faiVariable", "faiVariableRDN").get_ou("faiManagement", "faiBaseRDN").$release;
$res = faiManagement::check_class_name("FAIvariable",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_filterFAI.inc b/gosa-plugins/fai/admin/fai/class_filterFAI.inc
index 86f2e989b44f19929437b6c506a1dcb8e6c82a93..5f1065ce35df6554ed7fdbb7c503bd7a0f3061c3 100644 (file)
/* Clean up object informations */
$obj = array();
$obj['cn'] = $object['cn'][0];
- $obj['dn'] = $object['cn'][0].",".get_ou("faiBaseRDN").$config->current['BASE'];
+ $obj['dn'] = $object['cn'][0].",".get_ou("faiManagement", "faiBaseRDN").$config->current['BASE'];
$obj['acl'] = $acl;
$obj['class'] = $rest ['ACL'];
$obj['FAIstate'] = $entry['FAIstate'];
// Append opsi stuff ...
- if(class_available('opsi') && $base == get_ou("faiBaseRDN").$config->current['BASE']){
+ if(class_available('opsi') && $base == get_ou("faiManagement", "faiBaseRDN").$config->current['BASE']){
$opsi = new opsi($config);
$objects = array();
if($opsi instanceof opsi && $opsi->enabled()){
diff --git a/gosa-plugins/fai/admin/fai/class_filterOPSIPackages.inc b/gosa-plugins/fai/admin/fai/class_filterOPSIPackages.inc
index 2a52389f18a34067cb19c80e3a8e4b5171fc5181..e1712163406b19f0aa6a1ff8dab959f2eb143412 100644 (file)
$entries = array();
// Append opsi stuff ...
- if(class_available('opsi') && $base == get_ou("faiBaseRDN").$config->current['BASE']){
+ if(class_available('opsi') && $base == get_ou("faiManagement", "faiBaseRDN").$config->current['BASE']){
$opsi = new opsi($config);
$objects = array();
if($opsi instanceof opsi && $opsi->enabled()){