From ab0535e5c7d3059d33a6a8c1b1600f3f98eeed3a Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 10 May 2010 14:27:14 +0000 Subject: [PATCH] Reverted Last commits, I've accidentally replaced to much. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18296 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 | 95 +++++++++++++------ .../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 | 20 ++-- .../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 | 30 +++--- .../fai/admin/fai/class_faiPackage.inc | 6 +- .../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 | 18 ++-- 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 | 6 +- .../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, 305 insertions(+), 268 deletions(-) diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc index 586f3b11e..5d8330841 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("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "ogroups", array(get_ou("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("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "roles", array(get_ou("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("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "groups",array(get_ou("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 97c032ce3..e50de7e22 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("servgeneric", "serverRDN") , + $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("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("servgeneric", "serverRDN") , $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK); + get_ou("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 6e7ec7c85..1b45db134 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("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK); + "ogroups", array(get_ou("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("core", "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("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("core", "groupRDN") ),$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("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 23badf712..e7637663a 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1396,67 +1396,104 @@ function get_sub_department($value) * Example: * \code * # Determine LDAP base where systems are stored - * $base = get_ou("core", "userRDN") . $this->config->current['BASE']; + * $base = get_ou('systemRDN') . $this->config->current['BASE']; * $ldap->cd($base); * \endcode * */ -function get_ou($class,$name) +function get_ou($name) { - global $config; - + global $config; - // Check if RDN exists. - if(!$config->configRegistry->propertyExists($class, $name)){ - trigger_error("No department mapping found for type ".$name); - return ""; + $map = array( + "roleRDN" => "ou=roles,", + "ogroupRDN" => "ou=groups,", + "applicationRDN" => "ou=apps,", + "systemRDN" => "ou=systems,", + "serverRDN" => "ou=servers,ou=systems,", + "terminalRDN" => "ou=terminals,ou=systems,", + "workstationRDN" => "ou=workstations,ou=systems,", + "printerRDN" => "ou=printers,ou=systems,", + "phoneRDN" => "ou=phones,ou=systems,", + "componentRDN" => "ou=netdevices,ou=systems,", + "sambaMachineAccountRDN" => "ou=winstation,", + + "faxBlocklistRDN" => "ou=gofax,ou=systems,", + "systemIncomingRDN" => "ou=incoming,", + "aclRoleRDN" => "ou=aclroles,", + "phoneMacroRDN" => "ou=macros,ou=asterisk,ou=configs,ou=systems,", + "phoneConferenceRDN" => "ou=conferences,ou=asterisk,ou=configs,ou=systems,", + + "faiBaseRDN" => "ou=fai,ou=configs,ou=systems,", + "faiScriptRDN" => "ou=scripts,", + "faiHookRDN" => "ou=hooks,", + "faiTemplateRDN" => "ou=templates,", + "faiVariableRDN" => "ou=variables,", + "faiProfileRDN" => "ou=profiles,", + "faiPackageRDN" => "ou=packages,", + "faiPartitionRDN"=> "ou=disk,", + + "sudoRDN" => "ou=sudoers,", + + "deviceRDN" => "ou=devices,", + "mimetypeRDN" => "ou=mime,"); + + /* Preset ou... */ + if ($config->get_cfg_value("core",$name, "_not_set_") != "_not_set_"){ + $ou= $config->get_cfg_value("core",$name); + } elseif (isset($map[$name])) { + $ou = $map[$name]; + return($ou); + } else { + trigger_error("No department mapping found for type ".$name); + return ""; + } + + if ($ou != ""){ + if (!preg_match('/^[^=]+=[^=]+/', $ou)){ + $ou = @LDAP::convert("ou=$ou"); + } else { + $ou = @LDAP::convert("$ou"); } - $ou = $config->get_cfg_value($class,$name); - if ($ou != ""){ - if (!preg_match('/^[^=]+=[^=]+/', $ou)){ - $ou = @LDAP::convert("ou=$ou"); - } else { - $ou = @LDAP::convert("$ou"); - } - if(preg_match("/".preg_quote($config->current['BASE'], '/')."$/",$ou)){ - return($ou); - }else{ - return("$ou,"); - } - - } else { - return ""; + if(preg_match("/".preg_quote($config->current['BASE'], '/')."$/",$ou)){ + return($ou); + }else{ + return("$ou,"); } + + } else { + return ""; + } } /*! \brief Get the OU for users * - * Frontend for get_ou("core", "userRDN") with userRDN + * Frontend for get_ou() with userRDN * */ function get_people_ou() { - return (get_ou("core", "userRDN") ); + return (get_ou("userRDN")); } /*! \brief Get the OU for groups * - * Frontend for get_ou("core", "userRDN") with groupRDN + * Frontend for get_ou() with groupRDN */ function get_groups_ou() { - return (get_ou("core", "userRDN") ); + return (get_ou("groupRDN")); } /*! \brief Get the OU for winstations * - * Frontend for get_ou("core", "userRDN") with sambaMachineAccountRDN + * Frontend for get_ou() with sambaMachineAccountRDN */ function get_winstations_ou() { - return (get_ou("core", "userRDN") ); + return (get_ou("sambaMachineAccountRDN")); } diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index f866993ac..35151da1e 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("aclrole", "aclRoleRDN") ); // ACLs are attached to department containers + $this->storagePoints = array(get_ou("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 c818b6697..28be23385 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("aclrole", "aclRoleRDN") .$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.",".get_ou('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 d127d5dfb..70ad9abbd 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("core", "groupRDN") ); + $this->storagePoints = array(get_ou("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 a3f76d89c..f17008ce8 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("core", "userRDN") ); + $this->storagePoints = array(get_ou("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 9b3dd3dec..1a76fac60 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("core", "groupRDN") , get_ou("core", "userRDN") ); + $this->storagePoints = array(get_ou("userRDN"), get_ou("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 9a9869456..f5480b9d2 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("core", "userRDN") ); + $this->storagePoints = array(get_ou("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 afcfb8887..97af88167 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("group", "ogroupRDN") , '/')."/i","",$this->dn); + $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("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("group", "ogroupRDN") ,"ACL" => "server"), + "DN"=> get_ou('serverRDN') ,"ACL" => "server"), "workstations" => array("OBJ"=>"workgeneric", "CLASS"=>"gotoWorkstation", - "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "workstation"), + "DN"=> get_ou('workstationRDN') ,"ACL" => "workstation"), "winstations" => array("OBJ"=>"wingeneric", "CLASS"=>"opsiClient", - "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "winstation"), + "DN"=> get_ou('SAMBAMACHINEACCOUNTRDN') ,"ACL" => "winstation"), "terminals" => array("OBJ"=>"termgeneric", "CLASS"=>"gotoTerminal" , - "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "terminal"), + "DN"=> get_ou('terminalRDN') ,"ACL" => "terminal"), "printers" => array("OBJ"=>"printgeneric", "CLASS"=>"gotoPrinter" , - "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "printer"), + "DN"=> get_ou('printerRDN') ,"ACL" => "printer"), "phones" => array("OBJ"=>"phoneGeneric", "CLASS"=>"goFonHardware" , - "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "phone")); + "DN"=> get_ou('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("group", "ogroupRDN") ,"ACL" => "application"); + "DN"=> get_ou('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("group", "ogroupRDN") .$this->base; + $new_dn= 'cn='.$this->cn.','.get_ou('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("group", "ogroupRDN") .$this->base; + $this->dn= 'cn='.$this->cn.','.get_ou('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 460cbe43a..54be3f263 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("group", "ogroupRDN") ); + $this->storagePoints = array(get_ou("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 8a22728dd..f406bd7f9 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("core", "userRDN") , - get_ou("core", "userRDN") , - get_ou("core", "userRDN") , - get_ou("core", "userRDN") , - get_ou("core", "userRDN") , - get_ou("core", "userRDN") , - get_ou("core", "userRDN") ); + get_ou("userRDN"), + get_ou("groupRDN"), + get_ou("terminalRDN"), + get_ou("workstationRDN"), + get_ou("serverRDN"), + get_ou("printerRDN"), + get_ou("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 f45a36b14..f7846ba37 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("group", "ogroupRDN") .$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou('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("group", "ogroupRDN") .$baseobject->base; + $this->dn= 'cn='.$baseobject->cn.','.get_ou('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 116943789..f3a542938 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("core", "userRDN") ); + $this->storagePoints = array(get_ou("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 ec72c63a0..a44296cf1 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("core", "groupRDN") ); + $this->storagePoints = array(get_ou("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 e352f09af..9b449a81c 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("workgeneric", "workstationRDN") ,get_ou("terminalRDN", "terminalRDN") ,get_ou("servgeneric", "serverRDN") ,); + $this->storagePoints = array(get_ou("workstationRDN"),get_ou("terminalRDN"),get_ou("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 16760fd1f..ec5ce83c8 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("servgeneric", "serverRDN") , + $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("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 02b5719c3..f0c0a6d01 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("faiHook", "faiHookRDN") .get_ou("faiHook", "faiHookRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 a71d286e9..d07cbe93d 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -61,7 +61,7 @@ class faiManagement extends management $this->opsi = new opsi($this->config);; } - $this->fai_base = get_ou("mimetype", "mimetypeRDN") .$this->config->current['BASE']; + $this->fai_base = get_ou("faiBaseRDN").$this->config->current['BASE']; $cfg_rel = $this->config->get_cfg_value("faiManagement","defaultFaiRelease"); if(!empty($cfg_rel)){ @@ -78,13 +78,13 @@ class faiManagement extends management $this->acl_base = $this->config->current['BASE']; $this->ui = $ui; $this->storagePoints = array( - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") , - get_ou("mimetype", "mimetypeRDN") ); + get_ou('faiPartitionRDN'), + get_ou('faiPackageRDN'), + get_ou('faiScriptRDN'), + get_ou('faiVariableRDN'), + get_ou('faiHookRDN'), + get_ou('faiProfileRDN'), + get_ou('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("mimetype", "mimetypeRDN") , '/').'/i', ','.get_ou("mimetype", "mimetypeRDN") , $bb)); + $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('applicationRDN'), $bb)); $ldap->recursive_remove(); - $ldap->cd(preg_replace('/,'.preg_quote(get_ou("mimetype", "mimetypeRDN") , '/').'/i', ','.get_ou("mimetype", "mimetypeRDN") , $bb)); + $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('mimetypeRDN'), $bb)); $ldap->recursive_remove(); /* Search for all groups with configured application menus. @@ -612,7 +612,7 @@ class faiManagement extends management - The search für menu configuration for the specified release and collect all those dns. - Remove entries */ - $release_ou = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/').".*$/i","",$bb); + $release_ou = preg_replace("/".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$bb); $ldap->cd($this->config->current['BASE']); $ldap->search("(objectClass=posixGroup)",array("dn")); @@ -761,11 +761,11 @@ class faiManagement extends management $targetReleaseDN = "ou=".$name.",".$baseToUse; - $appsrc = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,$baseToUse); - $appdst = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,"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) ; - $mimesrc = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,$baseToUse); - $mimedst = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,"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) ; /* 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 6a93d9732..3657b9f6b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -185,7 +185,7 @@ class faiPackage extends plugin /* Assemble release name */ $release = $this->parent->parent->fai_release; - $tmp= preg_replace('/[,]*'.preg_quote(get_ou("faiPackage", "faiPackageRDN") , '/').'.*$/i', '', $release); + $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $release); $tmp= preg_replace('/ou=/', '', $tmp); $rev= array_reverse(explode(',', $tmp)); $this->FAIdebianRelease= "/"; @@ -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("faiPackage", "faiPackageRDN") .get_ou("faiPackage", "faiPackageRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('faiPackageRDN').get_ou('faiBaseRDN').$release; $res = faiManagement::check_class_name("FAIpackageList",$this->cn,$new_dn); if(isset($res[$this->cn])){ $message[] = msgPool::duplicated(_("Name")); @@ -589,7 +589,7 @@ class faiPackage extends plugin if($this->FAIdebianRelease == "ClearFromCopyPaste"){ $current_release = $this->parent->parent->fai_release; - $tmp= preg_replace('/,'.preg_quote(get_ou("faiPackage", "faiPackageRDN") , '/').'.*$/i', '', $current_release); + $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $current_release); $tmp= preg_replace('/ou=/', '', $tmp); $rev= array_reverse(explode(',', $tmp)); $this->FAIdebianRelease= ""; diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index 5673f307e..9e4c14dea 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("faiPartitionTable", "faiPartitionRDN") .get_ou("faiPartitionTable", "faiPartitionRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 921537d65..2d6fb5b8b 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("faiProfile", "faiProfileRDN") .get_ou("faiProfile", "faiProfileRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 9927b089b..d8283a973 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("faiScript", "faiScriptRDN") .get_ou("faiScript", "faiScriptRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 31878b91b..16ab54023 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("faiTemplate", "faiTemplateRDN") ) , - "FAIhook" => array( "Image" =>"plugins/fai/images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ), - "FAIvariable" => array( "Image" =>"plugins/fai/images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) , - "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("faiTemplate", "faiTemplateRDN") ) , - "FAIpackageList" => array( "Image" =>"plugins/fai/images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) , - "FAIprofile" => array( "Image" =>"plugins/fai/images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") )); + "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'))); } @@ -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("faiTemplate", "faiTemplateRDN") , '/')."/i","",$this->dn); + $str = preg_replace("/^.*".preg_quote(get_ou('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 27591a8c4..4ece4344c 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("faiTemplate", "faiTemplateRDN") .get_ou("faiTemplate", "faiTemplateRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 8fce416eb..78546c483 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("faiVariable", "faiVariableRDN") .get_ou("faiVariable", "faiVariableRDN") .$release; + $new_dn= 'cn='.$this->cn.",".get_ou('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 c2707b218..155b95e47 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("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowPartitions" , + "FAIpartitionTable" => array("OU"=> get_ou('faiPartitionRDN') , "CHKBOX"=>"ShowPartitions" , "ACL" => "faiPartitionTable"), - "FAIpackageList" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowPackages" , + "FAIpackageList" => array("OU"=> get_ou('faiPackageRDN') , "CHKBOX"=>"ShowPackages" , "ACL" => "faiPackage"), - "FAIscript" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowScripts" , + "FAIscript" => array("OU"=> get_ou('faiScriptRDN') , "CHKBOX"=>"ShowScripts" , "ACL" => "faiScript"), - "FAIvariable" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowVariables" , + "FAIvariable" => array("OU"=> get_ou('faiVariableRDN') , "CHKBOX"=>"ShowVariables" , "ACL" => "faiVariable"), - "FAIhook" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowHooks" , + "FAIhook" => array("OU"=> get_ou('faiHookRDN') , "CHKBOX"=>"ShowHooks" , "ACL" => "faiHook"), - "FAIprofile" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowProfiles" , + "FAIprofile" => array("OU"=> get_ou('faiProfileRDN') , "CHKBOX"=>"ShowProfiles" , "ACL" => "faiProfile"), - "FAItemplate" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowTemplates" , + "FAItemplate" => array("OU"=> get_ou('faiTemplateRDN') , "CHKBOX"=>"ShowTemplates" , "ACL" => "faiTemplate")); @@ -55,7 +55,7 @@ class filterFAI extends filterLDAP{ /* Clean up object informations */ $obj = array(); $obj['cn'] = $object['cn'][0]; - $obj['dn'] = $object['cn'][0].",".get_ou("faiTemplate", "faiTemplateRDN") .$config->current['BASE']; + $obj['dn'] = $object['cn'][0].",".get_ou("faiBaseRDN").$config->current['BASE']; $obj['acl'] = $acl; $obj['class'] = $rest ['ACL']; $obj['FAIstate'] = $entry['FAIstate']; @@ -98,7 +98,7 @@ class filterFAI extends filterLDAP{ // Append opsi stuff ... - if(class_available('opsi') && $base == get_ou("faiTemplate", "faiTemplateRDN") .$config->current['BASE']){ + if(class_available('opsi') && $base == get_ou("faiBaseRDN").$config->current['BASE']){ $opsi = new opsi($config); $objects = array(); if($opsi instanceof opsi && $opsi->enabled()){ diff --git a/gosa-plugins/fai/admin/fai/tabsHook.inc b/gosa-plugins/fai/admin/fai/tabsHook.inc index a64166ff3..40c997c76 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("faiHook", "faiHookRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 c134dccdb..835933f79 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("faiPackage", "faiPackageRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 f7a481539..3ac0e2257 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("faiPartitionTable", "faiPartitionRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 4d1450712..3773637e0 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("faiProfile", "faiProfileRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 692b6d549..7cf0a027e 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("faiScript", "faiScriptRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 2f1b43b34..e47096fd3 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("faiTemplate", "faiTemplateRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 dd9f8da71..5a636be08 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("faiVariable", "faiVariableRDN") .$this->parent->fai_release; + $new_dn ='cn='.$baseobject->cn.",".get_ou('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 9d1c44c8f..05c41436d 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("blocklistGeneric", "faxBlocklistRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("blocklistGeneric", "faxBlocklistRDN") .$this->config->current["BASE"]); + $ldap->cd (get_ou('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 07bcaa5bb..4f59ce256 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("blocklistGeneric", "faxBlocklistRDN") ); + $this->storagePoints = array(get_ou("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 d280acdc0..54a378674 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("blocklistGeneric", "faxBlocklistRDN") .$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('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 257d1bf63..f995d0d3f 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("core", "userRDN") ); + $this->storagePoints = array(get_ou("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 05b854410..b5ef3d318 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("phoneGeneric", "phoneRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("phoneGeneric", "phoneRDN") .$this->base; + $this->dn= "cn=".$this->cn.",".get_ou('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 b43bec434..b8a859058 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("phoneGeneric", "phoneRDN") .$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou('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 f77df2ba2..eb56f14a8 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("conference", "phoneConferenceRDN") , '/')."/i","",$this->dn);; + $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('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("conference", "phoneConferenceRDN") .$this->base); + $ldap->cd(get_ou('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 d5b21635c..113eb5075 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("conference", "phoneConferenceRDN") ); + $this->storagePoints = array(get_ou("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 5cf4dd4d8..8d51b1f9b 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("conference", "phoneConferenceRDN") .$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou('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 87605cc4e..fc9f8809d 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("macro", "phoneMacroRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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 a44b1d6b2..af074a936 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("macro", "phoneMacroRDN") ); + $this->storagePoints = array(get_ou("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 7a4626e6c..f874015e4 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("macro", "phoneMacroRDN") .$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('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 5788adbcc..672f51c39 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("group", "ogroupRDN") ), + $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("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("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") ); + get_ou("ogroupRDN"), + get_ou("serverRDN"), + get_ou("terminalRDN"), + get_ou("workstationRDN"), + get_ou("printerRDN"), + get_ou("componentRDN"), + get_ou("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("group", "ogroupRDN") ), + $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("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 5f905011e..f7ba9ec8e 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("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") ); + get_ou("serverRDN"), + get_ou("workstationRDN"), + get_ou("ogroupRDN"), + get_ou('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 e5a99a8c8..0649761c8 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("core", "userRDN") , - get_ou("core", "userRDN") ); + get_ou("userRDN"), + get_ou("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 0b077299d..bf11b1f7a 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("application", "applicationRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou('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("application", "applicationRDN") .$this->base, '/')."$/i","",$this->dn); + $release = preg_replace("/".preg_quote(get_ou("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("application", "applicationRDN") .$this->base; + $new_dn= "cn=".$this->cn.",".get_ou('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("application", "applicationRDN") .$this->base; + $base = get_ou('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 10530fcda..3cd74a415 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("application", "applicationRDN") .$this->config->current['BASE']; - $this->app_release = get_ou("application", "applicationRDN") .$this->config->current['BASE']; + $this->app_base = get_ou('applicationRDN').$this->config->current['BASE']; + $this->app_release = get_ou('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("application", "applicationRDN") ); + $this->storagePoints= array(get_ou("applicationRDN")); } // Build filter diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc index 8b96459f3..bf7a311f2 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("application", "applicationRDN") .$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('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 81993e1a2..037963de6 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("deviceGeneric", "deviceRDN") , '/')."/i","",$this->dn); + $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou('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 606f7b819..7ec0081b5 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("deviceGeneric", "deviceRDN") ); + $this->storagePoints= array(get_ou("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 12904f5a7..e2b497993 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("deviceGeneric", "deviceRDN") .$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('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 61bcba267..2f6e60a2c 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("application", "applicationRDN") )); + $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou('applicationRDN'))); if($this->enableReleaseManagement){ /* Only display those releases that we are able to read */ - $dn = get_ou("application", "applicationRDN") .$this->config->current['BASE']; + $dn = get_ou("applicationRDN").$this->config->current['BASE']; $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))"; $res = get_sub_list($filter,array("application","fai"), - array(get_ou("application", "applicationRDN") ,get_ou("faiManagement","faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH); + array(get_ou("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("application", "applicationRDN") ."/i",$attrs['dn'])){ + if(preg_match("/".get_ou('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("application", "applicationRDN") , '/').".*/i","",$attrs['dn']); + $bb = preg_replace("/".preg_quote(get_ou('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("application", "applicationRDN") ); + "parts" => $parts,"suffix" => $bb.get_ou('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("application", "applicationRDN") .preg_quote($this->curbase, '/')."$/",$app['dn'])){ + if(!preg_match("/".get_ou('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 fb6bc8733..2b85b69d5 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("mimetype", "mimetypeRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^.*,".preg_quote(get_ou("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("mimetype", "mimetypeRDN") .$this->base; + $base = get_ou("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 4967916bd..5c287006c 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("mimetype", "mimetypeRDN") .$this->config->current['BASE']; - $this->mime_release = get_ou("mimetype", "mimetypeRDN") .$this->config->current['BASE']; + $this->mime_base = get_ou('mimetypeRDN').$this->config->current['BASE']; + $this->mime_release = get_ou('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("mimetype", "mimetypeRDN") ); + $this->storagePoints= array(get_ou("mimetypeRDN")); } // Build filter diff --git a/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc b/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc index 33094eb0d..dacda4486 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("mimetype", "mimetypeRDN") .$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('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 39746e916..c420b2f1d 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("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); } if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('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("workgeneric", "workstationRDN") , '/')."/i",$this->dn)){ - $this->base= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i","",dn2base($this->dn)); + if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->dn)){ + $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i","",dn2base($this->dn)); }else{ - $this->base= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i","",dn2base($this->dn)); + $this->base= preg_replace("/".preg_quote(get_ou('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("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('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("workgeneric", "workstationRDN") , '/').",/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/i",get_ou('printerRDN'),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('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("workgeneric", "workstationRDN") .",".$this->base; + $dn= "cn=".$this->cn.get_ou('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("workgeneric", "workstationRDN") .$this->base, array("cn")); + $ldap->ls("(cn=".$this->cn.")",get_ou('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("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn); } if(preg_match("/workstation/i",$this->BelongsTo)){ - $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn); + $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('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("workgeneric", "workstationRDN") , '/')."/i",$this->orig_dn)){ + if(preg_match("/".preg_quote(get_ou('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 374b41133..6564b864c 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("ArpNewDevice", "systemIncomingRDN") , '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("ArpNewDevice", "systemIncomingRDN") .$this->base; + $this->dn= "cn=".$this->cn.",".get_ou('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("ArpNewDevice", "systemIncomingRDN") , '/')."/i", $ldap->getDN())){ + if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('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("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn); + $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('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("ArpNewDevice", "systemIncomingRDN") .$tmp. + $ldap->cat("cn=default,".get_ou('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 a7d91c1dd..28846fd50 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("group", "ogroupRDN") ), + $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("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("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") ); + get_ou("ogroupRDN"), + get_ou("serverRDN"), + get_ou("terminalRDN"), + get_ou("workstationRDN"), + get_ou("printerRDN"), + get_ou("componentRDN"), + get_ou("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("group", "ogroupRDN") , '/')."/",$dn)) continue; + if(preg_match("/".preg_quote(get_ou("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("group", "ogroupRDN") , '/')."/",$this->orig_dn)){ + if(!empty($mac) && !preg_match("/".preg_quote(get_ou("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 53f4324dd..b5ff4338c 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("workgeneric", "workstationRDN") , '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); }else{ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("workgeneric", "workstationRDN") .$this->base; + $this->dn= "cn=".$this->cn.",".get_ou('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("workgeneric", "workstationRDN") , '/')."/i", $ldap->getDN())){ + if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('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("workgeneric", "workstationRDN") , '/')."/i",$this->orig_dn)){ + !preg_match("/".preg_quote(get_ou("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 b2e4cc281..4b131ec53 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("group", "ogroupRDN") ), + $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("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("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") , - get_ou("group", "ogroupRDN") ); + get_ou("ogroupRDN"), + get_ou("serverRDN"), + get_ou("terminalRDN"), + get_ou("workstationRDN"), + get_ou("printerRDN"), + get_ou("componentRDN"), + get_ou("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("group", "ogroupRDN") , '/')."/",$dn)) continue; + if(preg_match("/".preg_quote(get_ou("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("group", "ogroupRDN") , '/')."/",$this->orig_dn)){ + if(!empty($mac) && !preg_match("/".preg_quote(get_ou("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 894f5e758..d28a4b201 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("termgeneric", "terminalRDN") , '/')."/i", "", $this->dn); + $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('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("termgeneric", "terminalRDN") .$tmp. + $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp. $this->config->current['BASE'], array('gotoTerminalPath')); $attrs= $ldap->fetch(); if (isset($attrs['gotoTerminalPath'])){ @@ -1224,7 +1224,7 @@ class workstartup extends plugin */ function dn_to_release_name($dn) { - $relevant = preg_replace("/,".preg_quote(get_ou("termgeneric", "terminalRDN") , '/').".*$/i","",$dn); + $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$dn); $parts = array_reverse(explode(",",$relevant)); $str =""; foreach($parts as $part){ diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc index cd93fa1b4..6a7e0e02d 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("printgeneric", "printerRDN") .$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou('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 b016331a5..b1adb9328 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("termgeneric", "terminalRDN") .$baseobject->base; + $this->dn= "cn=".$baseobject->cn.",".get_ou('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 4d0a4e80a..32bcaea5c 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("workgeneric", "workstationRDN") .$baseobject->base; + $this->dn= "cn=".$baseobject->cn.",".get_ou('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 4ca2f5e71..d62ad841a 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("servgeneric", "serverRDN") ; + $clip = "cn=" . $this->cn . ",".get_ou('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 672f071b8..8e50b5fc2 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("servgeneric", "serverRDN") ; + $clip = $tmp[0] . ",".get_ou('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 9f2c4ac10..fa512efda 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("deviceGeneric", "deviceRDN") ); + $this->storagePoints = array(get_ou("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 c05f094d9..bf42dec6c 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("printgeneric", "printerRDN") ); + $this->storagePoints = array(get_ou("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 2f69f77e1..90e835c92 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("servgeneric", "serverRDN") =>"computers", - get_ou("servgeneric", "serverRDN") =>"servers", + get_ou('systemRDN') =>"computers", + get_ou('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 e0f3fc047..b4f19fbc4 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("servgeneric", "serverRDN") : + case get_ou('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("servgeneric", "serverRDN") : $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn")); + case get_ou('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("servgeneric", "serverRDN") .$dn,"(objectClass=*)",array("cn")); + $servers= $ldap->gen_xls(get_ou('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 ba2ef6c4a..89820d9e2 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("core", "groupRDN") , get_ou("core", "userRDN") ); + $this->storagePoints = array(get_ou("userRDN"), get_ou('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 51b2bbf2f..b79e29d80 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("wingeneric", "sambaMachineAccountRDN") .$this->config->current['BASE'], + "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("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 1f2c76ff9..d2f9487b7 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("roleGeneric", "roleRDN") , '/i')."/","",$this->dn); + $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("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 7aa0defd2..38d45e7aa 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("roleGeneric", "roleRDN") ); + $this->storagePoints = array(get_ou("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 24b95e744..5ab586cf6 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("roleGeneric", "roleRDN") .$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou("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 ce697a006..1ba789d10 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("wingeneric", "sambaMachineAccountRDN") , '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("wingeneric", "sambaMachineAccountRDN") , '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("wingeneric", "sambaMachineAccountRDN") .$this->base; + $this->dn= "cn=".$this->uid.",".get_ou('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 24e614dbb..209b14fca 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("componentGeneric", "componentRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("componentGeneric", "componentRDN") .$this->base; + $this->dn= "cn=".$this->cn.",".get_ou('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("componentGeneric", "componentRDN") , '/')."/i",$attrs['dn'])){ + if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("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 f20158e13..d794cc807 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("ArpNewDevice", "systemIncomingRDN") ,'/')."/i", $entry['dn'])){ + if(preg_match("/".preg_quote(get_ou('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 1c6ac0c29..d8891da71 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("servgeneric", "serverRDN") , '/')."/i", $this->dn)){ - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn); + } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); } else { - $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn); + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("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("servgeneric", "serverRDN") .$this->base; + $this->dn= "cn=".$this->cn.",".get_ou('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("servgeneric", "serverRDN") , '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$attrs['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'])){ $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("servgeneric", "serverRDN") , '/')."/i",$this->orig_dn)){ + if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("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 5c2c7887c..d6934e9e2 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("group", "ogroupRDN") ); + $rdn = preg_replace("/^[^=]*=/", "", get_ou('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("group", "ogroupRDN") , '/')."/i", "", $data['OG']); + $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou('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("group", "ogroupRDN") , + "ou" => get_ou('serverRDN'), "plugClass" => "servgeneric", "tabClass" => "servtabs", "tabDesc" => "SERVTABS", @@ -1278,7 +1278,7 @@ class systemManagement extends management "aclCategory" => "server"), "gotoWorkstation" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('workstationRDN'), "plugClass" => "workgeneric", "tabClass" => "worktabs", "tabDesc" => "WORKTABS", @@ -1287,7 +1287,7 @@ class systemManagement extends management "aclCategory" => "workstation"), "gotoTerminal" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('terminalRDN'), "plugClass" => "termgeneric", "tabClass" => "termtabs", "sendEvents" => TRUE, @@ -1296,7 +1296,7 @@ class systemManagement extends management "aclCategory" => "terminal"), "gotoPrinter" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('printerRDN'), "plugClass" => "printgeneric", "tabClass" => "printtabs", "tabDesc" => "PRINTTABS", @@ -1305,7 +1305,7 @@ class systemManagement extends management "aclCategory" => "printer"), "FAKE_OC_NewDevice" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('systemIncomingRDN'), "plugClass" => "termgeneric", "tabClass" => "termtabs", "sendEvents" => TRUE, @@ -1314,7 +1314,7 @@ class systemManagement extends management "aclCategory" => "terminal"), "goFonHardware" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('phoneRDN'), "plugClass" => "phoneGeneric", "tabClass" => "phonetabs", "tabDesc" => "PHONETABS", @@ -1332,7 +1332,7 @@ class systemManagement extends management "aclCategory" => "winworkstation"), "ieee802Device" => array( - "ou" => get_ou("group", "ogroupRDN") , + "ou" => get_ou('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 b12a4ef58..dc37a1897 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("servgeneric", "serverRDN") ); - $a_ous = array(get_ou("servgeneric", "serverRDN") , - get_ou("servgeneric", "serverRDN") , - get_ou("servgeneric", "serverRDN") , - get_ou("servgeneric", "serverRDN") , - get_ou("servgeneric", "serverRDN") , - get_ou("servgeneric", "serverRDN") ); + $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")); $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 514767832..c46ce6286 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("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") ); + $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('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 7a227af14..5dfc787cc 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("componentGeneric", "componentRDN") .$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou('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 4435c6cfb..ea977581a 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("servgeneric", "serverRDN") .$baseobject->base; + $this->dn= "cn=$baseobject->cn,".get_ou('serverRDN').$baseobject->base; /* cn is not case sensitive for ldap, but for php it is!! */ if($baseobject->orig_dn != "new"){ -- 2.30.2