From 4229189d2ef29e70f0307f096fc15a52aed887c7 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 2 Jan 2008 13:00:57 +0000 Subject: [PATCH] Instead of using the string "ou=apps" we use get_ou('applicationou') now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8173 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/plugins/admin/acl/class_aclManagement.inc | 2 +- .../admin/applications/class_applicationGeneric.inc | 10 +++++----- .../applications/class_applicationManagement.inc | 8 ++++---- .../admin/applications/class_divListApplication.inc | 2 +- .../plugins/admin/applications/tabs_application.inc | 6 +++--- gosa-core/plugins/admin/fai/class_faiManagement.inc | 6 +++--- .../plugins/admin/groups/class_groupApplication.inc | 12 ++++++------ gosa-core/plugins/admin/ogroups/class_ogroup.inc | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index fd784ed0b..d88540206 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -469,7 +469,7 @@ class aclManagement extends plugin $fetch_this = array( "ME" => array("TYPE" => "cat" , "FLAGS" => GL_SIZELIMIT ,"BASE"=>""), "SYSTEMS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>"ou=systems,"), - "APPS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>"ou=apps,"), + "APPS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_ou('applicationou')), "PEOPLE" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_people_ou()), "GROUPS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_groups_ou())); diff --git a/gosa-core/plugins/admin/applications/class_applicationGeneric.inc b/gosa-core/plugins/admin/applications/class_applicationGeneric.inc index 22fcf10be..65cb8b75a 100644 --- a/gosa-core/plugins/admin/applications/class_applicationGeneric.inc +++ b/gosa-core/plugins/admin/applications/class_applicationGeneric.inc @@ -35,7 +35,7 @@ class application extends plugin $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if(!empty($tmp)) { - if(!preg_match("/^ou=apps,/",$_SESSION['appfilter']['release'])){ + if(!preg_match("/^".get_ou('applicationou')."/",$_SESSION['appfilter']['release'])){ $this->isReleaseApplikation = true; } } @@ -66,7 +66,7 @@ class application extends plugin } else { if($this->isReleaseApplikation){ - $this->base = preg_replace("/^.*,ou=apps,/","",$this->dn); + $this->base = preg_replace("/^.*,".get_ou('applicationou')."/","",$this->dn); }else{ $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn); } @@ -383,7 +383,7 @@ class application extends plugin /* Permissions for that base? */ if ($this->base != ""){ - $new_dn= "cn=".$this->cn.",ou=apps,".$this->base; + $new_dn= "cn=".$this->cn.",".get_ou('applicationou').$this->base; } else { $new_dn= $this->dn; } @@ -413,7 +413,7 @@ class application extends plugin $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){ $baseDn = str_replace($this->config->current['BASE'],$this->base,$_SESSION['appfilter']['release']); - $baseDn = preg_replace("/ou=apps,.*/","ou=apps,".$this->base,$_SESSION['appfilter']['release']); + $baseDn = preg_replace("/".get_ou('applicationou').".*/",get_ou('applicationou').$this->base,$_SESSION['appfilter']['release']); $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$baseDn,array("cn")); if($ldap->count()){ $attrs = $ldap->fetch(); @@ -422,7 +422,7 @@ class application extends plugin } } }else{ - $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))","ou=apps,".$this->base,array("cn")); + $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",get_ou('applicationou').$this->base,array("cn")); if ($ldap->count()){ $attrs = $ldap->fetch(); if($this->dn != $attrs['dn']) { diff --git a/gosa-core/plugins/admin/applications/class_applicationManagement.inc b/gosa-core/plugins/admin/applications/class_applicationManagement.inc index 1089c50e8..f474b5b74 100644 --- a/gosa-core/plugins/admin/applications/class_applicationManagement.inc +++ b/gosa-core/plugins/admin/applications/class_applicationManagement.inc @@ -69,9 +69,9 @@ class applicationManagement extends plugin function getReleases($base) { $ldap = $this->config->get_ldap_link(); - $dn = "ou=apps,".$base; + $dn = get_ou('applicationou').$base; $ret = array(); - $ret ["ou=apps,".$base] = "/"; + $ret [get_ou('applicationou').$base] = "/"; $ldap->cd($dn); $ldap->search("objectClass=organizationalUnit",array("ou")); @@ -507,12 +507,12 @@ class applicationManagement extends plugin $Releases = $this->getReleases($base); if(!$this->enableReleaseManagement){ - $use_base = "ou=apps,".$base; + $use_base = get_ou('applicationou').$base; }else{ if(isset($Releases[$release])){ $use_base = $release; }else{ - $use_base = "ou=apps,".$base; + $use_base = get_ou('applicationou').$base; } } diff --git a/gosa-core/plugins/admin/applications/class_divListApplication.inc b/gosa-core/plugins/admin/applications/class_divListApplication.inc index 15b09c6d7..8177d5129 100755 --- a/gosa-core/plugins/admin/applications/class_divListApplication.inc +++ b/gosa-core/plugins/admin/applications/class_divListApplication.inc @@ -22,7 +22,7 @@ class divListApplication extends MultiSelectWindow { MultiSelectWindow::MultiSelectWindow($config,"Application", "application"); - $this->selectedRelease = "ou=apps,".$_SESSION['CurrentMainBase']; + $this->selectedRelease = get_ou('applicationou').$_SESSION['CurrentMainBase']; $this->parent = &$parent; $this->ui = get_userinfo(); diff --git a/gosa-core/plugins/admin/applications/tabs_application.inc b/gosa-core/plugins/admin/applications/tabs_application.inc index 059e68335..1683c5ef0 100644 --- a/gosa-core/plugins/admin/applications/tabs_application.inc +++ b/gosa-core/plugins/admin/applications/tabs_application.inc @@ -14,7 +14,7 @@ class apptabs extends tabs function set_release($newRelease) { - $this->Release= preg_replace('/,ou=apps,.*$/', '', $newRelease); + $this->Release= preg_replace('/,'.get_ou('applicationou').'.*$/', '', $newRelease); if ($this->Release != ""){ $this->Release= ",".$this->Release; } @@ -29,12 +29,12 @@ class apptabs extends tabs $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs')); if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){ if(!$baseobject->isReleaseApplikation){ - $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base; }else{ $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release']; } }else{ - $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base; } /* Move group? */ diff --git a/gosa-core/plugins/admin/fai/class_faiManagement.inc b/gosa-core/plugins/admin/fai/class_faiManagement.inc index b9c027110..048d5a00d 100644 --- a/gosa-core/plugins/admin/fai/class_faiManagement.inc +++ b/gosa-core/plugins/admin/fai/class_faiManagement.inc @@ -456,7 +456,7 @@ class faiManagement extends plugin $name = $br[$bb]; $ldap->cd($bb); $ldap->recursive_remove(); - $ldap->cd(preg_replace('/,ou=fai,ou=configs,ou=systems,/', ',ou=apps,', $bb)); + $ldap->cd(preg_replace('/,ou=fai,ou=configs,ou=systems,/', ','.get_ou('applicationou'), $bb)); $ldap->recursive_remove(); $this->DivListFai->selectedBranch = "main"; @@ -555,8 +555,8 @@ 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) ; + $appsrc = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),$baseToUse); + $appdst = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),"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) ; diff --git a/gosa-core/plugins/admin/groups/class_groupApplication.inc b/gosa-core/plugins/admin/groups/class_groupApplication.inc index 02d0cc9bc..418fe3bbb 100644 --- a/gosa-core/plugins/admin/groups/class_groupApplication.inc +++ b/gosa-core/plugins/admin/groups/class_groupApplication.inc @@ -875,8 +875,8 @@ class appgroup extends plugin $ret =array(); foreach($res as $attrs){ - if(preg_match("/ou=apps,/",$attrs['dn'])){ - $bb = preg_replace("/ou=apps,.*/","",$attrs['dn']); + if(preg_match("/".get_ou('applicationou')."/",$attrs['dn'])){ + $bb = preg_replace("/".get_ou('applicationou').".*/","",$attrs['dn']); $parts = array_reverse(split("ou=",$bb)); $str =""; @@ -1069,12 +1069,12 @@ class appgroup extends plugin } /* Get applications for this release */ - $base = preg_replace("/ou=apps,.*$/","ou=apps,".$this->curbase,$base); + $base = preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou').$this->curbase,$base); $res = get_list("(objectClass=gosaApplication)","application",$base,array("*")); }else{ /* Get applications for this base */ - $res = get_list("(objectClass=gosaApplication)","application","ou=apps,".$this->curbase,array("*")); + $res = get_list("(objectClass=gosaApplication)","application",get_ou('applicationou').$this->curbase,array("*")); } /* Append applications */ @@ -1097,11 +1097,11 @@ class appgroup extends plugin $tmp = array_flip($this->Releases); foreach($res as $attrs){ - $testdn = preg_replace("/ou=apps,.*$/","ou=apps",$attrs['dn']); + $testdn = preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou'),$attrs['dn']); $testdn = preg_replace("/^[^,]+/","",$testdn); $testdn = preg_replace("/^,/","",$testdn); - if($testdn == preg_replace("/ou=apps,.*$/","ou=apps",$tmp[$this->FAIrelease])){ + if($testdn == preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou'),$tmp[$this->FAIrelease])){ $this->AllAppsForRelease[$attrs['dn']] = $attrs['cn'][0]; $this->AllAppsForReleaseParameter[$this->FAIrelease][$attrs['cn'][0]] = $attrs; } diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index e74b3985a..2660a81a5 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -387,7 +387,7 @@ class ogroup extends plugin $p_f= array("accounts" => array("CLASS"=>"gosaAccount" ,"DN"=> get_people_ou() ,"ACL" => "users"), "groups" => array("CLASS"=>"posixGroup" ,"DN"=> get_groups_ou() ,"ACL" => "groups"), - "applications" => array("CLASS"=>"gosaApplication","DN"=> "ou=apps," ,"ACL" => "application"), + "applications" => array("CLASS"=>"gosaApplication","DN"=> get_ou('applicationou') ,"ACL" => "application"), "departments" => array("CLASS"=>"gosaDepartment" ,"DN"=> "" ,"ACL" => "department"), "servers" => array("CLASS"=>"goServer" ,"DN"=> "ou=servers,ou=systems," ,"ACL" => "server"), "workstations" => array("CLASS"=>"gotoWorkstation","DN"=> "ou=workstations,ou=systems," ,"ACL" => "workstation"), -- 2.30.2