From 4e9dc0aa7650a9a9467c6073e9c5841419b5c53c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 11 May 2010 05:09:58 +0000 Subject: [PATCH] Updated get_ou() -It includes the source class now get_ou('core','userRDN'); -This makes it a lot easier to handle this values like properties. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18299 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_CopyPasteHandler.inc | 6 ++-- gosa-core/include/class_config.inc | 4 +-- gosa-core/include/class_plugin.inc | 6 ++-- gosa-core/include/functions.inc | 8 +++--- .../plugins/admin/acl/class_aclManagement.inc | 2 +- gosa-core/plugins/admin/acl/tabs_acl_role.inc | 2 +- .../admin/groups/class_groupManagement.inc | 2 +- .../class_singleUserSelect.inc | 2 +- .../userGroupSelect/class_userGroupSelect.inc | 2 +- .../groups/userSelect/class_userSelect.inc | 2 +- .../plugins/admin/ogroups/class_ogroup.inc | 18 ++++++------ .../admin/ogroups/class_ogroupManagement.inc | 2 +- .../objectSelect/class_objectSelect.inc | 14 +++++----- .../plugins/admin/ogroups/tabs_ogroups.inc | 4 +-- .../admin/users/class_userManagement.inc | 2 +- .../posix/groupSelect/class_groupSelect.inc | 2 +- .../posix/trustSelect/class_trustSelect.inc | 2 +- .../admin/systems/services/dns/class_DNS.inc | 2 +- gosa-plugins/fai/admin/fai/class_faiHook.inc | 2 +- .../fai/admin/fai/class_faiManagement.inc | 26 ++++++++--------- .../fai/admin/fai/class_faiPackage.inc | 2 +- .../fai/admin/fai/class_faiPartitionTable.inc | 2 +- .../fai/admin/fai/class_faiProfile.inc | 2 +- .../fai/admin/fai/class_faiScript.inc | 2 +- .../fai/admin/fai/class_faiSummaryTab.inc | 16 +++++------ .../fai/admin/fai/class_faiTemplate.inc | 2 +- .../fai/admin/fai/class_faiVariable.inc | 2 +- .../fai/admin/fai/class_filterFAI.inc | 14 +++++----- gosa-plugins/fai/admin/fai/tabsHook.inc | 2 +- gosa-plugins/fai/admin/fai/tabsPackage.inc | 2 +- gosa-plugins/fai/admin/fai/tabsPartition.inc | 2 +- gosa-plugins/fai/admin/fai/tabsProfile.inc | 2 +- gosa-plugins/fai/admin/fai/tabsScript.inc | 2 +- gosa-plugins/fai/admin/fai/tabsTemplate.inc | 2 +- gosa-plugins/fai/admin/fai/tabsVariable.inc | 2 +- .../blocklists/class_blocklistGeneric.inc | 4 +-- .../blocklists/class_blocklistManagement.inc | 2 +- .../gofax/gofax/blocklists/tabs_blocklist.inc | 2 +- .../faxNumberSelect/class_faxNumberSelect.inc | 2 +- .../systems/gofon/class_phoneGeneric.inc | 4 +-- .../gofon/admin/systems/gofon/tabs_phone.inc | 2 +- .../class_phoneConferenceGeneric.inc | 4 +-- .../class_phoneConferenceManagment.inc | 2 +- .../gofon/conference/tabs_conference.inc | 2 +- .../gofon/gofon/macro/class_gofonMacro.inc | 2 +- .../macro/class_gofonMacroManagement.inc | 2 +- .../gofon/gofon/macro/tabs_macros.inc | 2 +- .../gofon/phoneaccount/class_phoneAccount.inc | 18 ++++++------ .../events/class_EventAddSystemDialog.inc | 8 +++--- .../goto/events/class_EventAddUserDialog.inc | 4 +-- .../applications/class_applicationGeneric.inc | 8 +++--- .../class_applicationManagement.inc | 6 ++-- .../admin/applications/tabs_application.inc | 2 +- .../admin/devices/class_deviceGeneric.inc | 2 +- .../admin/devices/class_deviceManagement.inc | 2 +- .../goto/admin/devices/tabs_devices.inc | 2 +- .../groups/apps/class_groupApplication.inc | 14 +++++----- .../admin/mimetypes/class_mimetypeGeneric.inc | 4 +-- .../mimetypes/class_mimetypeManagement.inc | 6 ++-- .../goto/admin/mimetypes/tabs_mimetypes.inc | 2 +- .../admin/systems/goto/class_printGeneric.inc | 28 +++++++++---------- .../systems/goto/class_terminalGeneric.inc | 14 +++++----- .../systems/goto/class_terminalService.inc | 20 ++++++------- .../systems/goto/class_workstationGeneric.inc | 12 ++++---- .../systems/goto/class_workstationService.inc | 20 ++++++------- .../systems/goto/class_workstationStartup.inc | 4 +-- .../goto/admin/systems/goto/tabs_printers.inc | 2 +- .../goto/admin/systems/goto/tabs_terminal.inc | 2 +- .../admin/systems/goto/tabs_workstation.inc | 2 +- .../services/shares/class_goShareServer.inc | 2 +- .../systems/services/shares/class_servNfs.inc | 2 +- .../hotplugSelect/class_hotplugSelect.inc | 2 +- .../printerSelect/class_printerSelect.inc | 2 +- .../addons/ldapmanager/class_exportxls.inc | 4 +-- gosa-plugins/ldapmanager/html/getxls.php | 6 ++-- .../class_mailAddressSelect.inc | 2 +- gosa-plugins/opsi/admin/opsi/class_opsi.inc | 2 +- .../roleManagement/class_roleGeneric.inc | 2 +- .../roleManagement/class_roleManagement.inc | 2 +- .../admin/roleManagement/tabs_roles.inc | 2 +- .../admin/systems/samba/class_winGeneric.inc | 6 ++-- .../admin/systems/class_componentGeneric.inc | 6 ++-- .../admin/systems/class_filterSYSTEMS.inc | 2 +- .../admin/systems/class_servGeneric.inc | 12 ++++---- .../admin/systems/class_systemManagement.inc | 18 ++++++------ .../systems/admin/systems/class_termDNS.inc | 14 +++++----- .../systemSelect/class_systemSelect.inc | 2 +- .../systems/admin/systems/tabs_component.inc | 2 +- .../systems/admin/systems/tabs_server.inc | 2 +- 89 files changed, 235 insertions(+), 235 deletions(-) diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc index 5d8330841..587cdcc90 100644 --- a/gosa-core/include/class_CopyPasteHandler.inc +++ b/gosa-core/include/class_CopyPasteHandler.inc @@ -516,7 +516,7 @@ class CopyPasteHandler { // Migrate objectgroups $ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))", - "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "ogroups", array(get_ou("group", "ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all objectGroups foreach($ogroups as $ogroup){ @@ -527,7 +527,7 @@ class CopyPasteHandler { // Update roles $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))", - "roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all roles foreach($roles as $role){ @@ -548,7 +548,7 @@ class CopyPasteHandler { $uid = $this->current['object']->uid; $groups = get_sub_list("(&(objectClass=posixGroup)(memberUid={$suid}))", - "groups",array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "groups",array(get_ou("core", "groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all POSIX groups foreach($groups as $group){ diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index e50de7e22..314867e2d 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -866,7 +866,7 @@ class config { */ function getShareList($listboxEntry = false) { - $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverRDN"), + $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("servgeneric", "serverRDN"), $this->current['BASE'],array("goExportEntry","cn"), GL_NONE); $return =array(); foreach($tmp as $entry){ @@ -908,7 +908,7 @@ class config { $ui = get_userinfo(); $base = $config->current['BASE']; $res= get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))", "server", - get_ou("serverRDN"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK); + get_ou("servgeneric", "serverRDN"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK); foreach($res as $entry){ diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 1b45db134..612a6999e 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -860,7 +860,7 @@ class plugin // Migrate objectgroups if needed $ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))", - "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "ogroups", array(get_ou("group", "ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all objectGroups foreach($ogroups as $ogroup){ @@ -876,7 +876,7 @@ class plugin } // Migrate rfc groups if needed - $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("core", "groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all POSIX groups foreach($groups as $group){ @@ -887,7 +887,7 @@ class plugin } /* Update roles to use the new entry dn */ - $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); // Walk through all roles foreach($roles as $role){ diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index e7637663a..b66953840 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1396,7 +1396,7 @@ function get_sub_department($value) * Example: * \code * # Determine LDAP base where systems are stored - * $base = get_ou('systemRDN') . $this->config->current['BASE']; + * $base = get_ou("systemManagement", "systemRDN") . $this->config->current['BASE']; * $ldap->cd($base); * \endcode * */ @@ -1473,7 +1473,7 @@ function get_ou($name) * */ function get_people_ou() { - return (get_ou("userRDN")); + return (get_ou("core", "userRDN")); } @@ -1483,7 +1483,7 @@ function get_people_ou() */ function get_groups_ou() { - return (get_ou("groupRDN")); + return (get_ou("core", "groupRDN")); } @@ -1493,7 +1493,7 @@ function get_groups_ou() */ function get_winstations_ou() { - return (get_ou("sambaMachineAccountRDN")); + return (get_ou("wingeneric", "sambaMachineAccountRDN")); } diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 35151da1e..6c931dfd4 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -38,7 +38,7 @@ class aclManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("aclRoleRDN")); // ACLs are attached to department containers + $this->storagePoints = array(get_ou("aclrole", "aclRoleRDN")); // ACLs are attached to department containers // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/acl/tabs_acl_role.inc b/gosa-core/plugins/admin/acl/tabs_acl_role.inc index 28be23385..faa8214da 100644 --- a/gosa-core/plugins/admin/acl/tabs_acl_role.inc +++ b/gosa-core/plugins/admin/acl/tabs_acl_role.inc @@ -35,7 +35,7 @@ class aclroletab extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= 'cn='.$baseobject->cn.",".get_ou('aclRoleRDN').$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.",".get_ou("aclrole", "aclRoleRDN").$baseobject->base; if ($this->dn != $new_dn){ diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 70ad9abbd..41fa63a3b 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -38,7 +38,7 @@ class groupManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("groupRDN")); + $this->storagePoints = array(get_ou("core", "groupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc b/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc index f17008ce8..5133828c8 100644 --- a/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc +++ b/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc @@ -33,7 +33,7 @@ class singleUserSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN")); + $this->storagePoints = array(get_ou("core", "userRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc b/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc index 1a76fac60..cedf4f71b 100644 --- a/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc +++ b/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc @@ -32,7 +32,7 @@ class userGroupSelect extends management { $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN"), get_ou("groupRDN")); + $this->storagePoints = array(get_ou("core", "userRDN"), get_ou("core", "groupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc b/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc index f5480b9d2..b52436495 100644 --- a/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc +++ b/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc @@ -32,7 +32,7 @@ class userSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN")); + $this->storagePoints = array(get_ou("core", "userRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 97af88167..ee3496bcb 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -102,7 +102,7 @@ class ogroup extends plugin $ui = get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); } else { - $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/i","",$this->dn); + $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN"), '/')."/i","",$this->dn); } /* Detect all workstations, which are already assigned to an object group @@ -432,24 +432,24 @@ class ogroup extends plugin "departments" => array("OBJ"=>"department", "CLASS"=>"gosaDepartment" , "DN"=> "" ,"ACL" => "department"), "servers" => array("OBJ"=>"servgeneric", "CLASS"=>"goServer" , - "DN"=> get_ou('serverRDN') ,"ACL" => "server"), + "DN"=> get_ou("servgeneric", "serverRDN") ,"ACL" => "server"), "workstations" => array("OBJ"=>"workgeneric", "CLASS"=>"gotoWorkstation", - "DN"=> get_ou('workstationRDN') ,"ACL" => "workstation"), + "DN"=> get_ou("workgeneric", "workstationRDN") ,"ACL" => "workstation"), "winstations" => array("OBJ"=>"wingeneric", "CLASS"=>"opsiClient", "DN"=> get_ou('SAMBAMACHINEACCOUNTRDN') ,"ACL" => "winstation"), "terminals" => array("OBJ"=>"termgeneric", "CLASS"=>"gotoTerminal" , - "DN"=> get_ou('terminalRDN') ,"ACL" => "terminal"), + "DN"=> get_ou("termgeneric", "terminalRDN") ,"ACL" => "terminal"), "printers" => array("OBJ"=>"printgeneric", "CLASS"=>"gotoPrinter" , - "DN"=> get_ou('printerRDN') ,"ACL" => "printer"), + "DN"=> get_ou("printgeneric", "printerRDN") ,"ACL" => "printer"), "phones" => array("OBJ"=>"phoneGeneric", "CLASS"=>"goFonHardware" , - "DN"=> get_ou('phoneRDN') ,"ACL" => "phone")); + "DN"=> get_ou("phoneGeneric", "phoneRDN") ,"ACL" => "phone")); /* Allow searching for applications, if we are not using release managed applications */ if(!$this->IsReleaseManagementActivated()){ $p_f[ "applications"] = array("OBJ"=>"application", "CLASS"=>"gosaApplication", - "DN"=> get_ou('applicationRDN') ,"ACL" => "application"); + "DN"=> get_ou("application", "applicationRDN") ,"ACL" => "application"); } /*########### @@ -625,7 +625,7 @@ class ogroup extends plugin /* Permissions for that base? */ if ($this->base != ""){ - $new_dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base; + $new_dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN").$this->base; } else { $new_dn= $this->dn; } @@ -703,7 +703,7 @@ class ogroup extends plugin /* New accounts need proper 'dn', propagate it to remaining objects */ if ($this->dn == 'new'){ - $this->dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base; + $this->dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN").$this->base; } /* Save data. Using 'modify' implies that the entry is already present, use 'add' for diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 54be3f263..d1c6cfa2e 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -38,7 +38,7 @@ class ogroupManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("ogroupRDN")); + $this->storagePoints = array(get_ou("group", "ogroupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc index f406bd7f9..e8a5abad5 100644 --- a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc +++ b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc @@ -33,13 +33,13 @@ class objectSelect extends management $this->config = $config; $this->ui = $ui; $this->storagePoints = array( - get_ou("userRDN"), - get_ou("groupRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("serverRDN"), - get_ou("printerRDN"), - get_ou("phoneRDN")); + get_ou("core", "userRDN"), + get_ou("core", "groupRDN"), + get_ou("termgeneric", "terminalRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("servgeneric", "serverRDN"), + get_ou("printgeneric", "printerRDN"), + get_ou("phoneGeneric", "phoneRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc index f7846ba37..a37b9b8ac 100644 --- a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc +++ b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc @@ -344,7 +344,7 @@ class ogrouptabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN").$baseobject->base; /* Move group? */ if (LDAP::fix($this->dn) != LDAP::fix($new_dn)){ @@ -360,7 +360,7 @@ class ogrouptabs extends tabs } if ($this->dn == "new"){ - $this->dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base; + $this->dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN").$baseobject->base; } /* Only delete attributes if there are members left */ diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index f3a542938..d451a9aa3 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -47,7 +47,7 @@ class userManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN")); + $this->storagePoints = array(get_ou("core", "userRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc b/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc index a44296cf1..b47d517d7 100644 --- a/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc +++ b/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc @@ -33,7 +33,7 @@ class groupSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("groupRDN")); + $this->storagePoints = array(get_ou("core", "groupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc b/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc index 9b449a81c..b2ef0b612 100644 --- a/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc +++ b/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc @@ -33,7 +33,7 @@ class trustSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("workstationRDN"),get_ou("terminalRDN"),get_ou("serverRDN"),); + $this->storagePoints = array(get_ou("workgeneric", "workstationRDN"),get_ou("termgeneric", "terminalRDN"),get_ou("servgeneric", "serverRDN"),); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc index ec5ce83c8..73f07459d 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc @@ -667,7 +667,7 @@ class DNS $ret = array(); $ldap = $config->get_ldap_link(); - $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("serverRDN"), + $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("servgeneric", "serverRDN"), $config->current['BASE'],array("zoneName"),GL_NO_ACL_CHECK | GL_SUBSEARCH); foreach($tmp as $at){ diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index f0c0a6d01..d0e151712 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -381,7 +381,7 @@ class faiHook extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiHookRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiHook", "faiHookRDN").get_ou('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 d07cbe93d..9041bb00d 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -78,13 +78,13 @@ class faiManagement extends management $this->acl_base = $this->config->current['BASE']; $this->ui = $ui; $this->storagePoints = array( - get_ou('faiPartitionRDN'), - get_ou('faiPackageRDN'), - get_ou('faiScriptRDN'), - get_ou('faiVariableRDN'), - get_ou('faiHookRDN'), - get_ou('faiProfileRDN'), - get_ou('faiTemplateRDN')); + get_ou("faiPartitionTable", "faiPartitionRDN"), + get_ou("faiPackage", "faiPackageRDN"), + get_ou("faiScript", "faiScriptRDN"), + get_ou("faiVariable", "faiVariableRDN"), + get_ou("faiHook", "faiHookRDN"), + get_ou("faiProfile", "faiProfileRDN"), + get_ou("faiTemplate", "faiTemplateRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ @@ -602,9 +602,9 @@ class faiManagement extends management $ldap->cd($bb); $ldap->recursive_remove(); - $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('applicationRDN'), $bb)); + $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("application", "applicationRDN"), $bb)); $ldap->recursive_remove(); - $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('mimetypeRDN'), $bb)); + $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("mimetype", "mimetypeRDN"), $bb)); $ldap->recursive_remove(); /* Search for all groups with configured application menus. @@ -761,11 +761,11 @@ class faiManagement extends management $targetReleaseDN = "ou=".$name.",".$baseToUse; - $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),$baseToUse); - $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),"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) ; - $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),$baseToUse); - $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),"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) ; /* 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 3657b9f6b..28631c25f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -544,7 +544,7 @@ class faiPackage extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiPackageRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiPackage", "faiPackageRDN").get_ou('faiBaseRDN').$release; $res = faiManagement::check_class_name("FAIpackageList",$this->cn,$new_dn); if(isset($res[$this->cn])){ $message[] = msgPool::duplicated(_("Name")); diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index 9e4c14dea..6f3630e6e 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -481,7 +481,7 @@ class faiPartitionTable extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiPartitionRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").get_ou('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 2d6fb5b8b..80908909f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -284,7 +284,7 @@ class faiProfile extends plugin */ if($this->dn == "new" || $this->cn != $this->old_cn){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiProfileRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiProfile", "faiProfileRDN").get_ou('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 d8283a973..8575e6f8f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -386,7 +386,7 @@ class faiScript extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiScriptRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiScript", "faiScriptRDN").get_ou('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_faiSummaryTab.inc b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc index 16ab54023..d6991f49c 100644 --- a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc +++ b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc @@ -41,13 +41,13 @@ class faiSummaryTab extends plugin{ /* Base object configuration */ $this->objs = array( - "FAIscript" => array( "Image" =>"plugins/fai/images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>get_ou('faiScriptRDN')) , - "FAIhook" => array( "Image" =>"plugins/fai/images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou('faiHookRDN')), - "FAIvariable" => array( "Image" =>"plugins/fai/images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou('faiVariableRDN')) , - "FAItemplate" => array( "Image" =>"plugins/fai/images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>get_ou('faiTemplateRDN')) , - "FAIpartitionTable" => array( "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>get_ou('faiPartitionRDN')) , - "FAIpackageList" => array( "Image" =>"plugins/fai/images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou('faiPackageRDN')) , - "FAIprofile" => array( "Image" =>"plugins/fai/images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou('faiProfileRDN'))); + "FAIscript" => array( "Image" =>"plugins/fai/images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>get_ou("faiScript", "faiScriptRDN")) , + "FAIhook" => array( "Image" =>"plugins/fai/images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou("faiHook", "faiHookRDN")), + "FAIvariable" => array( "Image" =>"plugins/fai/images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou("faiVariable", "faiVariableRDN")) , + "FAItemplate" => array( "Image" =>"plugins/fai/images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN")) , + "FAIpartitionTable" => array( "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>get_ou("faiPartitionTable", "faiPartitionRDN")) , + "FAIpackageList" => array( "Image" =>"plugins/fai/images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou("faiPackage", "faiPackageRDN")) , + "FAIprofile" => array( "Image" =>"plugins/fai/images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou("faiProfile", "faiProfileRDN"))); } @@ -69,7 +69,7 @@ class faiSummaryTab extends plugin{ /* Get Classes and release */ $this->Classes = $this->parent->by_object['faiProfile']->FAIclasses; $this->base = $this->parent->by_object['faiProfile']->parent->parent->fai_release; - $str = preg_replace("/^.*".preg_quote(get_ou('faiProfileRDN'), '/')."/i","",$this->dn); + $str = preg_replace("/^.*".preg_quote(get_ou("faiProfile", "faiProfileRDN"), '/')."/i","",$this->dn); $tmp = $this->parent->by_object['faiProfile']->parent->parent->getBranches(); $this->Release = $tmp[$this->base]; diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc index 4ece4344c..b370dd6c9 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc @@ -404,7 +404,7 @@ class faiTemplate extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiTemplateRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiTemplate", "faiTemplateRDN").get_ou('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 78546c483..9de8ee312 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -290,7 +290,7 @@ class faiVariable extends plugin */ if($this->is_new){ $release = $this->parent->parent->fai_release; - $new_dn= 'cn='.$this->cn.",".get_ou('faiVariableRDN').get_ou('faiBaseRDN').$release; + $new_dn= 'cn='.$this->cn.",".get_ou("faiVariable", "faiVariableRDN").get_ou('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 155b95e47..86f2e989b 100644 --- a/gosa-plugins/fai/admin/fai/class_filterFAI.inc +++ b/gosa-plugins/fai/admin/fai/class_filterFAI.inc @@ -8,19 +8,19 @@ class filterFAI extends filterLDAP{ * Generate List of Partitions,Hooks,Scripts,Templates,Profiles ... */ $ObjectTypes = array( - "FAIpartitionTable" => array("OU"=> get_ou('faiPartitionRDN') , "CHKBOX"=>"ShowPartitions" , + "FAIpartitionTable" => array("OU"=> get_ou("faiPartitionTable", "faiPartitionRDN") , "CHKBOX"=>"ShowPartitions" , "ACL" => "faiPartitionTable"), - "FAIpackageList" => array("OU"=> get_ou('faiPackageRDN') , "CHKBOX"=>"ShowPackages" , + "FAIpackageList" => array("OU"=> get_ou("faiPackage", "faiPackageRDN") , "CHKBOX"=>"ShowPackages" , "ACL" => "faiPackage"), - "FAIscript" => array("OU"=> get_ou('faiScriptRDN') , "CHKBOX"=>"ShowScripts" , + "FAIscript" => array("OU"=> get_ou("faiScript", "faiScriptRDN") , "CHKBOX"=>"ShowScripts" , "ACL" => "faiScript"), - "FAIvariable" => array("OU"=> get_ou('faiVariableRDN') , "CHKBOX"=>"ShowVariables" , + "FAIvariable" => array("OU"=> get_ou("faiVariable", "faiVariableRDN") , "CHKBOX"=>"ShowVariables" , "ACL" => "faiVariable"), - "FAIhook" => array("OU"=> get_ou('faiHookRDN') , "CHKBOX"=>"ShowHooks" , + "FAIhook" => array("OU"=> get_ou("faiHook", "faiHookRDN") , "CHKBOX"=>"ShowHooks" , "ACL" => "faiHook"), - "FAIprofile" => array("OU"=> get_ou('faiProfileRDN') , "CHKBOX"=>"ShowProfiles" , + "FAIprofile" => array("OU"=> get_ou("faiProfile", "faiProfileRDN") , "CHKBOX"=>"ShowProfiles" , "ACL" => "faiProfile"), - "FAItemplate" => array("OU"=> get_ou('faiTemplateRDN') , "CHKBOX"=>"ShowTemplates" , + "FAItemplate" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowTemplates" , "ACL" => "faiTemplate")); diff --git a/gosa-plugins/fai/admin/fai/tabsHook.inc b/gosa-plugins/fai/admin/fai/tabsHook.inc index 40c997c76..a271f73ed 100644 --- a/gosa-plugins/fai/admin/fai/tabsHook.inc +++ b/gosa-plugins/fai/admin/fai/tabsHook.inc @@ -21,7 +21,7 @@ class tabsHook extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiHook']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiHookRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiHook", "faiHookRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsPackage.inc b/gosa-plugins/fai/admin/fai/tabsPackage.inc index 835933f79..f3111f4a0 100644 --- a/gosa-plugins/fai/admin/fai/tabsPackage.inc +++ b/gosa-plugins/fai/admin/fai/tabsPackage.inc @@ -22,7 +22,7 @@ class tabsPackage extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiPackage']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPackageRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPackage", "faiPackageRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsPartition.inc b/gosa-plugins/fai/admin/fai/tabsPartition.inc index 3ac0e2257..706658d66 100644 --- a/gosa-plugins/fai/admin/fai/tabsPartition.inc +++ b/gosa-plugins/fai/admin/fai/tabsPartition.inc @@ -23,7 +23,7 @@ class tabsPartition extends tabs { $baseobject= $this->by_object['faiPartitionTable']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPartitionRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsProfile.inc b/gosa-plugins/fai/admin/fai/tabsProfile.inc index 3773637e0..ac147a50f 100644 --- a/gosa-plugins/fai/admin/fai/tabsProfile.inc +++ b/gosa-plugins/fai/admin/fai/tabsProfile.inc @@ -22,7 +22,7 @@ class tabsProfile extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiProfile']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiProfileRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiProfile", "faiProfileRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsScript.inc b/gosa-plugins/fai/admin/fai/tabsScript.inc index 7cf0a027e..02e27c7b5 100644 --- a/gosa-plugins/fai/admin/fai/tabsScript.inc +++ b/gosa-plugins/fai/admin/fai/tabsScript.inc @@ -22,7 +22,7 @@ class tabsScript extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiScript']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiScriptRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiScript", "faiScriptRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsTemplate.inc b/gosa-plugins/fai/admin/fai/tabsTemplate.inc index e47096fd3..6c5e41b7f 100644 --- a/gosa-plugins/fai/admin/fai/tabsTemplate.inc +++ b/gosa-plugins/fai/admin/fai/tabsTemplate.inc @@ -22,7 +22,7 @@ class tabsTemplate extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiTemplate']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiTemplateRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiTemplate", "faiTemplateRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/fai/admin/fai/tabsVariable.inc b/gosa-plugins/fai/admin/fai/tabsVariable.inc index 5a636be08..dd38c1b7e 100644 --- a/gosa-plugins/fai/admin/fai/tabsVariable.inc +++ b/gosa-plugins/fai/admin/fai/tabsVariable.inc @@ -22,7 +22,7 @@ class tabsVariable extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['faiVariable']; - $new_dn ='cn='.$baseobject->cn.",".get_ou('faiVariableRDN').$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou("faiVariable", "faiVariableRDN").$this->parent->fai_release; if ($this->dn != $new_dn && $this->dn != "new"){ diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc index 05c41436d..5683258e8 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc @@ -69,7 +69,7 @@ class blocklistGeneric extends plugin $this->base= dn2base($ui->dn); } } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("faxBlocklistRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("blocklistGeneric", "faxBlocklistRDN"), '/')."/i", "", $this->dn); } $this->orig_base = $this->base; @@ -216,7 +216,7 @@ class blocklistGeneric extends plugin } if ($this->dn == 'new'){ $ldap= $this->config->get_ldap_link(); - $ldap->cd (get_ou('faxBlocklistRDN').$this->config->current["BASE"]); + $ldap->cd (get_ou("blocklistGeneric", "faxBlocklistRDN").$this->config->current["BASE"]); $ldap->search ("(&(|(objectClass=goFaxSBlock)(objectClass=goFaxRBlock))(cn=".$this->cn."))", array("cn")); if ($ldap->count() != 0){ $message[]= msgPool::duplicated(_("Name")); diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc index 4f59ce256..3afc620ad 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc @@ -38,7 +38,7 @@ class blocklist extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("faxBlocklistRDN")); + $this->storagePoints = array(get_ou("blocklistGeneric", "faxBlocklistRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc b/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc index 54a378674..79c879ed6 100644 --- a/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc +++ b/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc @@ -15,7 +15,7 @@ class faxblocktabs extends tabs $baseobject= $this->by_object['blocklistGeneric']; /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= "cn=".$baseobject->cn.",".get_ou('faxBlocklistRDN').$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou("blocklistGeneric", "faxBlocklistRDN").$baseobject->base; /* Move group? */ if ($this->dn != $new_dn){ diff --git a/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc b/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc index f995d0d3f..ccac9544f 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc @@ -32,7 +32,7 @@ class faxNumberSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN")); + $this->storagePoints = array(get_ou("core", "userRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc index b5ef3d318..a3bfe73ef 100644 --- a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc +++ b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc @@ -64,7 +64,7 @@ class phoneGeneric extends plugin $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); $this->cn= ""; } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneGeneric", "phoneRDN"), '/')."/i", "", $this->dn); } if($this->goFonMSN != ""){ @@ -301,7 +301,7 @@ class phoneGeneric extends plugin $message= plugin::check(); $message= array_merge($message, $this->netConfigDNS->check()); - $this->dn= "cn=".$this->cn.",".get_ou('phoneRDN').$this->base; + $this->dn= "cn=".$this->cn.",".get_ou("phoneGeneric", "phoneRDN").$this->base; /* To check for valid ip*/ if($this->netConfigDNS->ipHostNumber == ""){ diff --git a/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc b/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc index b8a859058..f18188b08 100644 --- a/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc +++ b/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc @@ -25,7 +25,7 @@ class phonetabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['phoneGeneric']; - $this->dn= "cn=$baseobject->cn,".get_ou('phoneRDN').$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou("phoneGeneric", "phoneRDN").$baseobject->base; $baseobject->dn= $this->dn; foreach ($this->by_object as $key => $obj){ diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc index eb56f14a8..399a3aef8 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc @@ -118,7 +118,7 @@ class conference extends plugin } else { /* Get base */ - $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('phoneConferenceRDN'), '/')."/i","",$this->dn);; + $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou("conference", "phoneConferenceRDN"), '/')."/i","",$this->dn);; } $this->goFonConferenceOwner=$this->ui->dn; @@ -383,7 +383,7 @@ class conference extends plugin if($this->old_cn != $this->cn || $this->base != $this->old_base){ $ldap = $this->config->get_ldap_link(); - $ldap->cd(get_ou('phoneConferenceRDN').$this->base); + $ldap->cd(get_ou("conference", "phoneConferenceRDN").$this->base); $ldap->search("(&(objectClass=goFonConference)(cn=".$this->cn."))",array("cn")); if($ldap->count()){ $message[] = msgPool::duplicated(_("Name")); diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc index 113eb5075..29867ddae 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc @@ -38,7 +38,7 @@ class phoneConferenceManagment extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("phoneConferenceRDN")); + $this->storagePoints = array(get_ou("conference", "phoneConferenceRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/gofon/gofon/conference/tabs_conference.inc b/gosa-plugins/gofon/gofon/conference/tabs_conference.inc index 8d51b1f9b..35038a579 100644 --- a/gosa-plugins/gofon/gofon/conference/tabs_conference.inc +++ b/gosa-plugins/gofon/gofon/conference/tabs_conference.inc @@ -22,7 +22,7 @@ class conferencetabs extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['conference']; - $new_dn= 'cn='.$baseobject->cn.','.get_ou('phoneConferenceRDN').$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou("conference", "phoneConferenceRDN").$baseobject->base; if(strtolower($this->dn)==strtolower($new_dn)){ $this->dn=$new_dn; diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index fc9f8809d..63424cd41 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -64,7 +64,7 @@ class macro extends plugin } } else { $this->orig_cn=$this->cn; - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneMacroRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("macro", "phoneMacroRDN"), '/')."/i", "", $this->dn); } /* Check server configurations diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index af074a936..90f937337 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -39,7 +39,7 @@ class goFonMacro extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("phoneMacroRDN")); + $this->storagePoints = array(get_ou("macro", "phoneMacroRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/gofon/gofon/macro/tabs_macros.inc b/gosa-plugins/gofon/gofon/macro/tabs_macros.inc index f874015e4..e797fb881 100644 --- a/gosa-plugins/gofon/gofon/macro/tabs_macros.inc +++ b/gosa-plugins/gofon/gofon/macro/tabs_macros.inc @@ -17,7 +17,7 @@ class macrotabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= "cn=".$baseobject->cn.",".get_ou('phoneMacroRDN').$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou("macro", "phoneMacroRDN").$baseobject->base; /* Move group? */ if ($this->dn != $new_dn){ diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index 672f51c39..c12bc487f 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -165,7 +165,7 @@ class phoneAccount extends plugin /* Get available phone hardware * Search for all available phone hardware */ - $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneRDN")), + $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneGeneric", "phoneRDN")), $this->config->current['BASE'],array("cn","description"), GL_SUBSEARCH); foreach($tmp as $attrs){ $cn= $attrs['cn'][0]; @@ -184,13 +184,13 @@ class phoneAccount extends plugin */ $deps_a = array( get_people_ou(), - get_ou("ogroupRDN"), - get_ou("serverRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("printerRDN"), - get_ou("componentRDN"), - get_ou("phoneRDN")); + get_ou("group", "ogroupRDN"), + get_ou("servgeneric", "serverRDN"), + get_ou("termgeneric", "terminalRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("printgeneric", "printerRDN"), + get_ou("componentGeneric", "componentRDN"), + get_ou("phoneGeneric", "phoneRDN")); $tmp = get_sub_list("(goFonHardware=*)","phone",$deps_a,$this->config->current['BASE'], array('cn','dn','goFonHardware'),GL_SUBSEARCH); @@ -206,7 +206,7 @@ class phoneAccount extends plugin * Search for all Macros that are visible and create * an array with name and parameters */ - $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("phoneMacroRDN")), + $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("macro", "phoneMacroRDN")), $this->config->current['BASE'],array("displayName","goFonMacroParameter","dn","cn"), GL_NO_ACL_CHECK | GL_SUBSEARCH ); diff --git a/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc b/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc index f7ba9ec8e..cb20ebed3 100644 --- a/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc +++ b/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc @@ -31,10 +31,10 @@ class EventAddSystemDialog extends management $this->config = $config; $this->ui = $ui; $this->storagePoints = array( - get_ou("serverRDN"), - get_ou("workstationRDN"), - get_ou("ogroupRDN"), - get_ou('terminalRDN')); + get_ou("servgeneric", "serverRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("group", "ogroupRDN"), + get_ou("termgeneric", "terminalRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc b/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc index 0649761c8..85aac6185 100644 --- a/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc +++ b/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc @@ -31,8 +31,8 @@ class EventAddUserDialog extends management $this->config = $config; $this->ui = $ui; $this->storagePoints = array( - get_ou("userRDN"), - get_ou("groupRDN")); + get_ou("core", "userRDN"), + get_ou("core", "groupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc index bf11b1f7a..84ac3d16a 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc @@ -59,7 +59,7 @@ class application extends plugin $this->base= dn2base($ui->dn); } } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou('applicationRDN'), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("application", "applicationRDN"), '/')."/i", "", $this->dn); } $this->orig_cn = $this->cn; @@ -209,7 +209,7 @@ class application extends plugin function remove_from_parent() { /* Parse release out of object dn */ - $release = preg_replace("/".preg_quote(get_ou("applicationRDN").$this->base, '/')."$/i","",$this->dn); + $release = preg_replace("/".preg_quote(get_ou("application", "applicationRDN").$this->base, '/')."$/i","",$this->dn); $release = preg_replace("/^cn=[^,]+,/","",$release); /* Get a list of all groups @@ -404,7 +404,7 @@ class application extends plugin /* Permissions for that base? */ if ($this->base != ""){ - $new_dn= "cn=".$this->cn.",".get_ou('applicationRDN').$this->base; + $new_dn= "cn=".$this->cn.",".get_ou("application", "applicationRDN").$this->base; } else { $new_dn= $this->dn; } @@ -433,7 +433,7 @@ class application extends plugin if($this->is_release()){ $base = $this->parent->parent->app_release; }else{ - $base = get_ou('applicationRDN').$this->base; + $base = get_ou("application", "applicationRDN").$this->base; } $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$base,array("cn")); diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index 3cd74a415..d468b4c2e 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -42,8 +42,8 @@ class applicationManagement extends management { $this->config = $config; $this->ui = $ui; - $this->app_base = get_ou('applicationRDN').$this->config->current['BASE']; - $this->app_release = get_ou('applicationRDN').$this->config->current['BASE']; + $this->app_base = get_ou("application", "applicationRDN").$this->config->current['BASE']; + $this->app_release = get_ou("application", "applicationRDN").$this->config->current['BASE']; if($this->IsReleaseManagementActivated()){ $filter_xml = "application-filter-release.xml"; @@ -54,7 +54,7 @@ class applicationManagement extends management }else{ $filter_xml = "application-filter.xml"; $list_xml = "application-list.xml"; - $this->storagePoints= array(get_ou("applicationRDN")); + $this->storagePoints= array(get_ou("application", "applicationRDN")); } // Build filter diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc index bf7a311f2..eea2a1a45 100644 --- a/gosa-plugins/goto/admin/applications/tabs_application.inc +++ b/gosa-plugins/goto/admin/applications/tabs_application.inc @@ -30,7 +30,7 @@ class apptabs extends tabs if($baseobject->parent->parent->IsReleaseManagementActivated()){ $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release; }else{ - $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou("application", "applicationRDN").$baseobject->base; } // Do we have to move the object? diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc index 037963de6..693fe19f9 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc @@ -56,7 +56,7 @@ class deviceGeneric extends plugin $this->base= dn2base($ui->dn); } } else { - $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou('deviceRDN'), '/')."/i","",$this->dn); + $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou("deviceGeneric", "deviceRDN"), '/')."/i","",$this->dn); } $this->orig_base = $this->base; $this->orig_dn = $this->dn; diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 7ec0081b5..133537b34 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -42,7 +42,7 @@ class deviceManagement extends management $filter_xml = "device-filter.xml"; $list_xml = "device-list.xml"; - $this->storagePoints= array(get_ou("deviceRDN")); + $this->storagePoints= array(get_ou("deviceGeneric", "deviceRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/goto/admin/devices/tabs_devices.inc b/gosa-plugins/goto/admin/devices/tabs_devices.inc index e2b497993..518fe8469 100644 --- a/gosa-plugins/goto/admin/devices/tabs_devices.inc +++ b/gosa-plugins/goto/admin/devices/tabs_devices.inc @@ -15,7 +15,7 @@ class devicetabs extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['deviceGeneric']; - $new_dn= "cn=".$baseobject->cn.",".get_ou('deviceRDN').$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou("deviceGeneric", "deviceRDN").$baseobject->base; /* Move group? */ if ($this->dn != $new_dn){ diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc index 2f6e60a2c..56fc4ace6 100644 --- a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc +++ b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc @@ -148,26 +148,26 @@ class appgroup extends plugin */ function getReleases() { - $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou('applicationRDN'))); + $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou("application", "applicationRDN"))); if($this->enableReleaseManagement){ /* Only display those releases that we are able to read */ - $dn = get_ou("applicationRDN").$this->config->current['BASE']; + $dn = get_ou("application", "applicationRDN").$this->config->current['BASE']; $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))"; $res = get_sub_list($filter,array("application","fai"), - array(get_ou("applicationRDN"),get_ou("faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH); + array(get_ou("application", "applicationRDN"),get_ou("faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH); /* Go through all departments and check which department is a valid department release. */ foreach($res as $attrs){ - if(preg_match("/".get_ou('applicationRDN')."/i",$attrs['dn'])){ + if(preg_match("/".get_ou("application", "applicationRDN")."/i",$attrs['dn'])){ /* Parse all returned departments dns into a useable type. (ou=1.0.0,ou=halut,ou=apps ==> halue/1.0.0) */ - $bb = preg_replace("/".preg_quote(get_ou('applicationRDN'), '/').".*/i","",$attrs['dn']); + $bb = preg_replace("/".preg_quote(get_ou("application", "applicationRDN"), '/').".*/i","",$attrs['dn']); $parts = array_reverse(explode("ou=",$bb)); $str =""; @@ -205,7 +205,7 @@ class appgroup extends plugin "found" => $found, "FAIstate" => $FAIstate, "dn" => $attrs['dn'], - "parts" => $parts,"suffix" => $bb.get_ou('applicationRDN')); + "parts" => $parts,"suffix" => $bb.get_ou("application", "applicationRDN")); } } } @@ -466,7 +466,7 @@ class appgroup extends plugin $used_apps = $this->_get_used_entry_name(); foreach($this->apps as $key => $app){ if(in_array($app['cn'][0],$used_apps)) continue; - if(!preg_match("/".get_ou('applicationRDN').preg_quote($this->curbase, '/')."$/",$app['dn'])){ + if(!preg_match("/".get_ou("application", "applicationRDN").preg_quote($this->curbase, '/')."$/",$app['dn'])){ continue; } diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc index 2b85b69d5..fcedd7043 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc @@ -126,7 +126,7 @@ class mimetype extends plugin $this->base= dn2base($ui->dn); } } else { - $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetype", "mimetypeRDN"), '/')."/i", "", $this->dn); } /* Get icon data */ @@ -524,7 +524,7 @@ class mimetype extends plugin if($this->is_release()){ $base = $this->parent->parent->mime_release; }else{ - $base = get_ou("mimetypeRDN").$this->base; + $base = get_ou("mimetype", "mimetypeRDN").$this->base; } $ldap->ls("(&(objectClass=gotoMimeType)(cn=".$this->cn."))",$base,array("cn")); diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 5c287006c..fa0bb955d 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -42,8 +42,8 @@ class mimetypeManagement extends management { $this->config = $config; $this->ui = $ui; - $this->mime_base = get_ou('mimetypeRDN').$this->config->current['BASE']; - $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE']; + $this->mime_base = get_ou("mimetype", "mimetypeRDN").$this->config->current['BASE']; + $this->mime_release = get_ou("mimetype", "mimetypeRDN").$this->config->current['BASE']; if($this->IsReleaseManagementActivated()){ $filter_xml = "mimetype-filter-release.xml"; @@ -54,7 +54,7 @@ class mimetypeManagement extends management }else{ $filter_xml = "mimetype-filter.xml"; $list_xml = "mimetype-list.xml"; - $this->storagePoints= array(get_ou("mimetypeRDN")); + $this->storagePoints= array(get_ou("mimetype", "mimetypeRDN")); } // Build filter diff --git a/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc b/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc index dacda4486..6244c0623 100644 --- a/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc +++ b/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc @@ -30,7 +30,7 @@ class mimetabs extends tabs if($this->parent->IsReleaseManagementActivated()){ $new_dn= "cn=".$baseobject->cn.",".$this->parent->mime_release; }else{ - $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeRDN').$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou("mimetype", "mimetypeRDN").$baseobject->base; } /* Move group? */ diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index c420b2f1d..7bd5622c1 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -71,11 +71,11 @@ class printgeneric extends plugin /* Update dn, to ensure storing as printer instead of WS / terminal */ if(preg_match("/Terminal/i",$this->BelongsTo) || preg_match("/TerminalTemplate/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } $this->orig_dn = $this->dn; @@ -104,10 +104,10 @@ class printgeneric extends plugin } else { /* Set base and check if the extracted base exists */ - if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->dn)){ - $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i","",dn2base($this->dn)); + if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->dn)){ + $this->base= preg_replace("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i","",dn2base($this->dn)); }else{ - $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/i","",dn2base($this->dn)); + $this->base= preg_replace("/".preg_quote(get_ou("printgeneric", "printerRDN"), '/')."/i","",dn2base($this->dn)); } if(!isset($this->config->idepartments[$this->base])){ @@ -256,11 +256,11 @@ class printgeneric extends plugin /* Update dn, to ensure storing as printer instead of WS / terminal */ if(preg_match("/terminal/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } /* Detect if this is a valid printer account; @@ -625,11 +625,11 @@ class printgeneric extends plugin /* Update dn, to ensure storing as printer instead of WS / terminal */ if(preg_match("/terminal/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/').",/i",get_ou("printgeneric", "printerRDN"),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } /* Check if this dn points to a printer, to avoid deleting something else */ @@ -727,7 +727,7 @@ class printgeneric extends plugin } } - $dn= "cn=".$this->cn.get_ou('printerRDN').",".$this->base; + $dn= "cn=".$this->cn.get_ou("printgeneric", "printerRDN").",".$this->base; /* must: cn */ if(($this->BelongsTo == "Printer") && $this->cn == ""){ @@ -753,7 +753,7 @@ class printgeneric extends plugin if (($this->orig_dn != $dn)&&( preg_match("/printer/i",$this->BelongsTo))){ $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->base); - $ldap->ls("(cn=".$this->cn.")",get_ou('printerRDN').$this->base, array("cn")); + $ldap->ls("(cn=".$this->cn.")",get_ou("printgeneric", "printerRDN").$this->base, array("cn")); if ($ldap->count() != 0){ while ($attrs= $ldap->fetch()){ if(preg_match("/cn=dhcp,/",$attrs['dn'])){ @@ -785,11 +785,11 @@ class printgeneric extends plugin /* Update dn, to ensure storing as printer instead of WS / terminal */ if(preg_match("/terminal/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn); } if(!$this->is_account) return; @@ -921,7 +921,7 @@ class printgeneric extends plugin } /* Ensure to create a new object */ - if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->orig_dn)){ + if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){ $this->orig_dn = "new"; } diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index 6564b864c..add8d2ba7 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -125,10 +125,10 @@ class termgeneric extends plugin if ($this->dn == "new"){ $ui= get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); - } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn); } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn); } /* Create an array of all Syslog servers */ @@ -420,7 +420,7 @@ class termgeneric extends plugin } /* Permissions for that base? */ - $this->dn= "cn=".$this->cn.",".get_ou('terminalRDN').$this->base; + $this->dn= "cn=".$this->cn.",".get_ou("termgeneric", "terminalRDN").$this->base; if ($this->cn == ""){ $message[]= msgPool::required(_("Name")); @@ -448,7 +448,7 @@ class termgeneric extends plugin } if ($ldap->count() != 0){ while ($attrs= $ldap->fetch()){ - if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){ + if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $ldap->getDN())){ continue; } else { if ($attrs['dn'] != $this->orig_dn){ @@ -493,7 +493,7 @@ class termgeneric extends plugin $ldap= $this->config->get_ldap_link(); /* Strip relevant part from dn, keep trailing ',' */ - $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn); + $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn); $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp); /* Walk from top to base and try to load default values for @@ -501,7 +501,7 @@ class termgeneric extends plugin while (TRUE){ $tmp= preg_replace ("/^[^,]+,/", "", $tmp); - $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp. + $ldap->cat("cn=default,".get_ou("termgeneric", "terminalRDN").$tmp. $this->config->current['BASE'], array('gotoTerminalPath')); $attrs= $ldap->fetch(); if (isset($attrs['gotoTerminalPath'])){ diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc index 28846fd50..9d1f4ed74 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc @@ -198,7 +198,7 @@ class termservice extends plugin /* Load phone hardware list */ - $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")), + $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneGeneric", "phoneRDN")), $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK); foreach($tmp as $attrs){ $cn= $attrs['cn'][0]; @@ -216,13 +216,13 @@ class termservice extends plugin */ $deps_a = array( get_people_ou(), - get_ou("ogroupRDN"), - get_ou("serverRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("printerRDN"), - get_ou("componentRDN"), - get_ou("phoneRDN")); + get_ou("group", "ogroupRDN"), + get_ou("servgeneric", "serverRDN"), + get_ou("termgeneric", "terminalRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("printgeneric", "printerRDN"), + get_ou("componentGeneric", "componentRDN"), + get_ou("phoneGeneric", "phoneRDN")); $tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'], array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK); @@ -650,7 +650,7 @@ class termservice extends plugin */ $p = $this->parent->by_object['ogroup']; foreach($p->memberList as $dn => $obj){ - if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue; + if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$dn)) continue; if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){ $macs[] = $p->objcache[$dn]['macAddress']; } @@ -660,7 +660,7 @@ class termservice extends plugin /* We are a workstation. Add current mac. */ $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress; - if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){ + if(!empty($mac) && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$this->orig_dn)){ $macs[] = $mac; } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index b5ff4338c..777198691 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -141,10 +141,10 @@ class workgeneric extends plugin if ($this->dn == "new"){ $ui= get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); - } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn); }else{ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workstationRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i", "", $this->dn); } /* Create an array of all Syslog servers */ @@ -429,7 +429,7 @@ class workgeneric extends plugin $message= array_merge($message, $this->netConfigDNS->check()); } - $this->dn= "cn=".$this->cn.",".get_ou('workstationRDN').$this->base; + $this->dn= "cn=".$this->cn.",".get_ou("workgeneric", "workstationRDN").$this->base; if ($this->cn == ""){ $message[]= msgPool::required(_("Name")); @@ -456,7 +456,7 @@ class workgeneric extends plugin } if ($ldap->count() != 0){ while ($attrs= $ldap->fetch()){ - if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){ + if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $ldap->getDN())){ continue; } else { if ($attrs['dn'] != $this->orig_dn){ @@ -486,7 +486,7 @@ class workgeneric extends plugin }else{ /* Warn the user, that this host is currently installing */ if($this->currently_installing && !$this->currently_installing_warned && - !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){ + !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){ /* Force aborting without message dialog */ $message[] = ""; diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index 4b131ec53..5cf847b1b 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -137,7 +137,7 @@ class workservice extends plugin /* Load phone hardware list */ - $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")), + $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneGeneric", "phoneRDN")), $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK); foreach($tmp as $attrs){ $cn= $attrs['cn'][0]; @@ -155,13 +155,13 @@ class workservice extends plugin */ $deps_a = array( get_people_ou(), - get_ou("ogroupRDN"), - get_ou("serverRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("printerRDN"), - get_ou("componentRDN"), - get_ou("phoneRDN")); + get_ou("group", "ogroupRDN"), + get_ou("servgeneric", "serverRDN"), + get_ou("termgeneric", "terminalRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("printgeneric", "printerRDN"), + get_ou("componentGeneric", "componentRDN"), + get_ou("phoneGeneric", "phoneRDN")); $tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'], array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK); @@ -544,7 +544,7 @@ class workservice extends plugin */ $p = $this->parent->by_object['ogroup']; foreach($p->memberList as $dn => $obj){ - if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue; + if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$dn)) continue; if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){ $macs[] = $p->objcache[$dn]['macAddress']; } @@ -554,7 +554,7 @@ class workservice extends plugin /* We are a workstation. Add current mac. */ $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress; - if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){ + if(!empty($mac) && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$this->orig_dn)){ $macs[] = $mac; } } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index d28a4b201..53ae8325a 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -674,7 +674,7 @@ class workstartup extends plugin $ldap= $this->config->get_ldap_link(); /* Strip relevant part from dn, keep trailing ',' */ - $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn); + $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn); $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp); /* Walk from top to base and try to load default values for @@ -682,7 +682,7 @@ class workstartup extends plugin while (TRUE){ $tmp= preg_replace ("/^[^,]+,/", "", $tmp); - $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp. + $ldap->cat("cn=default,".get_ou("termgeneric", "terminalRDN").$tmp. $this->config->current['BASE'], array('gotoTerminalPath')); $attrs= $ldap->fetch(); if (isset($attrs['gotoTerminalPath'])){ diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc index 6a7e0e02d..95ae791d9 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc @@ -81,7 +81,7 @@ class printtabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['printgeneric']; - $this->dn= "cn=$baseobject->cn,".get_ou('printerRDN').$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou("printgeneric", "printerRDN").$baseobject->base; $baseobject->dn= $this->dn; foreach ($this->by_object as $key => $obj){ diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc index b1adb9328..444182e7e 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc @@ -87,7 +87,7 @@ class termtabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['termgeneric']; - $this->dn= "cn=".$baseobject->cn.",".get_ou('terminalRDN').$baseobject->base; + $this->dn= "cn=".$baseobject->cn.",".get_ou("termgeneric", "terminalRDN").$baseobject->base; $baseobject->dn= $this->dn; if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){ diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc index 32bcaea5c..83fbaf7ac 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc @@ -86,7 +86,7 @@ class worktabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['workgeneric']; - $this->dn= "cn=".$baseobject->cn.",".get_ou('workstationRDN').$baseobject->base; + $this->dn= "cn=".$baseobject->cn.",".get_ou("workgeneric", "workstationRDN").$baseobject->base; if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){ diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc b/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc index d62ad841a..c3bde1a0c 100644 --- a/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc +++ b/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc @@ -264,7 +264,7 @@ class goShareServer extends goService{ function process_mounts() { - $clip = "cn=" . $this->cn . ",".get_ou('serverRDN'); + $clip = "cn=" . $this->cn . ",".get_ou("servgeneric", "serverRDN"); $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip)); $mounts = array( diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc b/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc index 8e50b5fc2..b0b6b1156 100644 --- a/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc +++ b/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc @@ -115,7 +115,7 @@ class servnfs extends plugin $smarty->assign("mount_checked", "checked"); } else { $tmp = explode(",", $this->dn); - $clip = $tmp[0] . ",".get_ou('serverRDN'); + $clip = $tmp[0] . ",".get_ou("servgeneric", "serverRDN"); $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip)); switch ($this->type) { case "netatalk" : { diff --git a/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc b/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc index fa512efda..5ee3d492e 100644 --- a/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc +++ b/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc @@ -33,7 +33,7 @@ class hotplugSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("deviceRDN")); + $this->storagePoints = array(get_ou("deviceGeneric", "deviceRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc b/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc index bf42dec6c..78af46c89 100644 --- a/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc +++ b/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc @@ -33,7 +33,7 @@ class printerSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("printerRDN")); + $this->storagePoints = array(get_ou("printgeneric", "printerRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc index 90e835c92..14b734ac9 100644 --- a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc +++ b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc @@ -76,8 +76,8 @@ class xlsexport extends plugin $smarty->assign("deplist", $bases); $smarty->assign("choicelist",array( get_people_ou() =>"users" , get_groups_ou() =>"groups" , - get_ou('systemRDN') =>"computers", - get_ou('serverRDN') =>"servers", + get_ou("systemManagement", "systemRDN") =>"computers", + get_ou("servgeneric", "serverRDN") =>"servers", "dc=addressbook," =>"addressbook")); // Get the LDAP link, to generate the Export diff --git a/gosa-plugins/ldapmanager/html/getxls.php b/gosa-plugins/ldapmanager/html/getxls.php index b4f19fbc4..649d5200d 100644 --- a/gosa-plugins/ldapmanager/html/getxls.php +++ b/gosa-plugins/ldapmanager/html/getxls.php @@ -152,7 +152,7 @@ function dump_ldap ($mode= 0) /* SYSTEMS Get all systems from th $dn and put them into the xls work sheet */ - case get_ou('systemRDN'): + case get_ou("systemManagement", "systemRDN"): $name_section=_("Servers"); $computers= $ldap->gen_xls($dn,"(&(objectClass=*)(cn=*))",array("cn","description","uid")); @@ -183,7 +183,7 @@ function dump_ldap ($mode= 0) /* SYSTEMS Get all systems from th $dn and put them into the xls work sheet */ - case get_ou('serverRDN'): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn")); + case get_ou("servgeneric", "serverRDN"): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn")); $intitul=array(_("Server name").":"); //name of the xls file @@ -288,7 +288,7 @@ function dump_ldap ($mode= 0) $computers= $ldap->gen_xls("ou=computers,".$dn,"(objectClass=*)",array("cn","description","uid")); $computers_intitul=array(_("Description").":",_("UID").":"); //data about servers - $servers= $ldap->gen_xls(get_ou('serverRDN').$dn,"(objectClass=*)",array("cn")); + $servers= $ldap->gen_xls(get_ou("servgeneric", "serverRDN").$dn,"(objectClass=*)",array("cn")); $servers_intitul=array(_("Name").":"); //data about addressbook $address= $ldap->gen_xls("dc=addressbook,".$dn,"(objectClass=*)", diff --git a/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc b/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc index 89820d9e2..849276a49 100644 --- a/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc +++ b/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc @@ -33,7 +33,7 @@ class mailAddressSelect extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("userRDN"), get_ou('groupRDN')); + $this->storagePoints = array(get_ou("core", "userRDN"), get_ou("core", "groupRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc index b79e29d80..0dd5b04ba 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsi.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsi.inc @@ -95,7 +95,7 @@ class opsi extends gosaSupportDaemon foreach($res as $entry){ if(!isset($entry['MAC'][0]['VALUE'])) $entry['MAC'][0]['VALUE'] = ""; $obj = array( - "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("sambaMachineAccountRDN").$this->config->current['BASE'], + "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("wingeneric", "sambaMachineAccountRDN").$this->config->current['BASE'], "objectClass" => array("gosa_opsi_client"), "cn" => array(0 => $entry['NAME'][0]['VALUE']), "macAddress" => array(0 => $entry['MAC'][0]['VALUE']), diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc index d2f9487b7..0270f6ae9 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc @@ -73,7 +73,7 @@ class roleGeneric extends plugin { $ui = get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); } else { - $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleRDN"), '/i')."/","",$this->dn); + $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleGeneric", "roleRDN"), '/i')."/","",$this->dn); } // Keep track of naming attribute modifications diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc index 38d45e7aa..968baf6f9 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc @@ -38,7 +38,7 @@ class roleManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("roleRDN")); + $this->storagePoints = array(get_ou("roleGeneric", "roleRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc b/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc index 5ab586cf6..98b3c00c3 100644 --- a/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc +++ b/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc @@ -55,7 +55,7 @@ class roletabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleRDN").$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleGeneric", "roleRDN").$baseobject->base; /* Move role? */ if ($this->dn != $new_dn){ diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc index 1ba789d10..dd09288bb 100644 --- a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc +++ b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc @@ -60,8 +60,8 @@ class wingeneric extends plugin $ui = get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); $this->cn= ""; - } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn); } else { $this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou(), '/')."/i", "", $this->dn); } @@ -192,7 +192,7 @@ class wingeneric extends plugin /* Call common method to give check the hook */ $message= plugin::check(); $message= array_merge($message, $this->netConfigDNS->check()); - $this->dn= "cn=".$this->uid.",".get_ou('sambaMachineAccountRDN').$this->base; + $this->dn= "cn=".$this->uid.",".get_ou("wingeneric", "sambaMachineAccountRDN").$this->base; if(!$this->acl_is_createable()){ $message[]= msgPool::permCreate(); diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc index 209b14fca..869d7fe04 100644 --- a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc @@ -51,7 +51,7 @@ class componentGeneric extends plugin $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); $this->cn= ""; } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentGeneric", "componentRDN"), '/')."/i", "", $this->dn); } $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true); /* Save dn for later references */ @@ -181,7 +181,7 @@ class componentGeneric extends plugin $message= plugin::check(); $message= array_merge($message,$this->netConfigDNS->check()); - $this->dn= "cn=".$this->cn.",".get_ou('componentRDN').$this->base; + $this->dn= "cn=".$this->cn.",".get_ou("componentGeneric", "componentRDN").$this->base; if ($this->cn == "" ){ $message[]= msgPool::required(_("Component name")); @@ -210,7 +210,7 @@ class componentGeneric extends plugin if(preg_match("/cn=dhcp,/",$attrs['dn'])){ continue; } - if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"), '/')."/i",$attrs['dn'])){ + if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentGeneric", "componentRDN"), '/')."/i",$attrs['dn'])){ $message[]= msgPool::duplicated(_("Component name")); break; } diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc index d794cc807..4c67c8bcd 100644 --- a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc +++ b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc @@ -14,7 +14,7 @@ class filterSYSTEMS { foreach($entries as $key => $entry){ - if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){ + if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"),'/')."/i", $entry['dn'])){ // Detect incoming types if(in_array('gotoWorkstation', $entry['objectClass'])){ diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index d8891da71..10ef0acf6 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -84,10 +84,10 @@ class servgeneric extends plugin $ui= get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); $this->cn= ""; - } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn); } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i", "", $this->dn); } $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses); $this->netConfigDNS->set_acl_category("server"); @@ -312,7 +312,7 @@ class servgeneric extends plugin /* Call common method to give check the hook */ $message= plugin::check(); $message= array_merge($message, $this->netConfigDNS->check()); - $this->dn= "cn=".$this->cn.",".get_ou('serverRDN').$this->base; + $this->dn= "cn=".$this->cn.",".get_ou("servgeneric", "serverRDN").$this->base; /* must: cn */ if ($this->cn == ""){ @@ -336,7 +336,7 @@ class servgeneric extends plugin if ($ldap->count() != 0){ while ($attrs= $ldap->fetch()){ if ($attrs['dn'] != $this->orig_dn){ - if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou('serverRDN'), '/')."/i",$attrs['dn'])){ + if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i",$attrs['dn'])){ $message[]= msgPool::duplicated(_("Server name")); break; } @@ -346,7 +346,7 @@ class servgeneric extends plugin } /* Warn the user, that this host is currently installing */ - if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){ + if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){ /* Force aborting without message dialog */ $message[] = ""; diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index d6934e9e2..066a767dd 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -543,7 +543,7 @@ class systemManagement extends management */ static function incomingFilterConverter($filter) { - $rdn = preg_replace("/^[^=]*=/", "", get_ou('systemIncomingRDN')); + $rdn = preg_replace("/^[^=]*=/", "", get_ou("ArpNewDevice", "systemIncomingRDN")); $rdn = preg_replace("/,.*$/","",$rdn); return(preg_replace("/%systemIncomingRDN/", $rdn,$filter)); } @@ -849,7 +849,7 @@ class systemManagement extends management $data['OG'], "Selected ogroup:"); if($data['OG'] != "none"){ - $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou('ogroupRDN'), '/')."/i", "", $data['OG']); + $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN"), '/')."/i", "", $data['OG']); $this->tabObject->by_object[$plugClass]->baseSelector->setBase($this->tabObject->base); } else { $this->tabObject->by_object[$plugClass]->baseSelector->setBase($headpage->getBase()); @@ -1269,7 +1269,7 @@ class systemManagement extends management "aclCategory" => "opsi"), "goServer" => array( - "ou" => get_ou('serverRDN'), + "ou" => get_ou("servgeneric", "serverRDN"), "plugClass" => "servgeneric", "tabClass" => "servtabs", "tabDesc" => "SERVTABS", @@ -1278,7 +1278,7 @@ class systemManagement extends management "aclCategory" => "server"), "gotoWorkstation" => array( - "ou" => get_ou('workstationRDN'), + "ou" => get_ou("workgeneric", "workstationRDN"), "plugClass" => "workgeneric", "tabClass" => "worktabs", "tabDesc" => "WORKTABS", @@ -1287,7 +1287,7 @@ class systemManagement extends management "aclCategory" => "workstation"), "gotoTerminal" => array( - "ou" => get_ou('terminalRDN'), + "ou" => get_ou("termgeneric", "terminalRDN"), "plugClass" => "termgeneric", "tabClass" => "termtabs", "sendEvents" => TRUE, @@ -1296,7 +1296,7 @@ class systemManagement extends management "aclCategory" => "terminal"), "gotoPrinter" => array( - "ou" => get_ou('printerRDN'), + "ou" => get_ou("printgeneric", "printerRDN"), "plugClass" => "printgeneric", "tabClass" => "printtabs", "tabDesc" => "PRINTTABS", @@ -1305,7 +1305,7 @@ class systemManagement extends management "aclCategory" => "printer"), "FAKE_OC_NewDevice" => array( - "ou" => get_ou('systemIncomingRDN'), + "ou" => get_ou("ArpNewDevice", "systemIncomingRDN"), "plugClass" => "termgeneric", "tabClass" => "termtabs", "sendEvents" => TRUE, @@ -1314,7 +1314,7 @@ class systemManagement extends management "aclCategory" => "terminal"), "goFonHardware" => array( - "ou" => get_ou('phoneRDN'), + "ou" => get_ou("phoneGeneric", "phoneRDN"), "plugClass" => "phoneGeneric", "tabClass" => "phonetabs", "tabDesc" => "PHONETABS", @@ -1332,7 +1332,7 @@ class systemManagement extends management "aclCategory" => "winworkstation"), "ieee802Device" => array( - "ou" => get_ou('componentRDN'), + "ou" => get_ou("componentGeneric", "componentRDN"), "plugClass" => "componentGeneric", "sendEvents" => FALSE, "tabClass" => "componenttabs", diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index dc37a1897..ccfe12465 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -189,13 +189,13 @@ class termDNS extends plugin over the whole ldap server was 10 to 20 times slower. */ $deps = array(); - $ou = preg_replace("/,.*$/","",get_ou("systemRDN")); - $a_ous = array(get_ou("serverRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("printerRDN"), - get_ou("phoneRDN"), - get_ou("componentRDN")); + $ou = preg_replace("/,.*$/","",get_ou("systemManagement", "systemRDN")); + $a_ous = array(get_ou("servgeneric", "serverRDN"), + get_ou("termgeneric", "terminalRDN"), + get_ou("workgeneric", "workstationRDN"), + get_ou("printgeneric", "printerRDN"), + get_ou("phoneGeneric", "phoneRDN"), + get_ou("componentGeneric", "componentRDN")); $ldap = $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); diff --git a/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc index c46ce6286..875a55512 100644 --- a/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc +++ b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc @@ -32,7 +32,7 @@ class systemSelect extends management { $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('terminalRDN')); + $this->storagePoints = array(get_ou("servgeneric", "serverRDN"), get_ou("workgeneric", "workstationRDN"), get_ou("termgeneric", "terminalRDN")); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-plugins/systems/admin/systems/tabs_component.inc b/gosa-plugins/systems/admin/systems/tabs_component.inc index 5dfc787cc..ac1a6ab5e 100644 --- a/gosa-plugins/systems/admin/systems/tabs_component.inc +++ b/gosa-plugins/systems/admin/systems/tabs_component.inc @@ -45,7 +45,7 @@ class componenttabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['componentGeneric']; - $this->dn= "cn=$baseobject->cn,".get_ou('componentRDN').$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou("componentGeneric", "componentRDN").$baseobject->base; if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){ diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc index ea977581a..1acab8a03 100644 --- a/gosa-plugins/systems/admin/systems/tabs_server.inc +++ b/gosa-plugins/systems/admin/systems/tabs_server.inc @@ -101,7 +101,7 @@ class servtabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ $baseobject= $this->by_object['servgeneric']; - $this->dn= "cn=$baseobject->cn,".get_ou('serverRDN').$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou("servgeneric", "serverRDN").$baseobject->base; /* cn is not case sensitive for ldap, but for php it is!! */ if($baseobject->orig_dn != "new"){ -- 2.30.2