Code

Updated get_ou()
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 May 2010 05:09:58 +0000 (05:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 May 2010 05:09:58 +0000 (05:09 +0000)
-It includes the source class now   get_ou('core','userRDN');
-This makes it a lot easier to handle this values like properties.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18299 594d385d-05f5-0310-b6e9-bd551577e9d8

89 files changed:
gosa-core/include/class_CopyPasteHandler.inc
gosa-core/include/class_config.inc
gosa-core/include/class_plugin.inc
gosa-core/include/functions.inc
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/tabs_acl_role.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc
gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc
gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc
gosa-core/plugins/admin/ogroups/tabs_ogroups.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc
gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc
gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc
gosa-plugins/fai/admin/fai/class_faiHook.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/class_faiPackage.inc
gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
gosa-plugins/fai/admin/fai/class_faiProfile.inc
gosa-plugins/fai/admin/fai/class_faiScript.inc
gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc
gosa-plugins/fai/admin/fai/class_faiTemplate.inc
gosa-plugins/fai/admin/fai/class_faiVariable.inc
gosa-plugins/fai/admin/fai/class_filterFAI.inc
gosa-plugins/fai/admin/fai/tabsHook.inc
gosa-plugins/fai/admin/fai/tabsPackage.inc
gosa-plugins/fai/admin/fai/tabsPartition.inc
gosa-plugins/fai/admin/fai/tabsProfile.inc
gosa-plugins/fai/admin/fai/tabsScript.inc
gosa-plugins/fai/admin/fai/tabsTemplate.inc
gosa-plugins/fai/admin/fai/tabsVariable.inc
gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc
gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc
gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
gosa-plugins/gofon/gofon/conference/tabs_conference.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
gosa-plugins/gofon/gofon/macro/tabs_macros.inc
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc
gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc
gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/tabs_application.inc
gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
gosa-plugins/goto/admin/devices/class_deviceManagement.inc
gosa-plugins/goto/admin/devices/tabs_devices.inc
gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
gosa-plugins/goto/admin/systems/goto/tabs_printers.inc
gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc
gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc
gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc
gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc
gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc
gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc
gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc
gosa-plugins/ldapmanager/html/getxls.php
gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc
gosa-plugins/opsi/admin/opsi/class_opsi.inc
gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc
gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc
gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc
gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
gosa-plugins/systems/admin/systems/class_servGeneric.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc
gosa-plugins/systems/admin/systems/class_termDNS.inc
gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc
gosa-plugins/systems/admin/systems/tabs_component.inc
gosa-plugins/systems/admin/systems/tabs_server.inc

index 5d83308418693cb9e1b529bd53d71660b8797922..587cdcc901c95143a375540d660294cf147e2e7b 100644 (file)
@@ -516,7 +516,7 @@ class CopyPasteHandler {
 
     // Migrate objectgroups
     $ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
-            "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+            "ogroups", array(get_ou("group", "ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all objectGroups
     foreach($ogroups as $ogroup){
@@ -527,7 +527,7 @@ class CopyPasteHandler {
 
     // Update roles 
     $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
-            "roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+            "roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all roles
     foreach($roles as $role){
@@ -548,7 +548,7 @@ class CopyPasteHandler {
 
             $uid = $this->current['object']->uid;
             $groups = get_sub_list("(&(objectClass=posixGroup)(memberUid={$suid}))",
-                    "groups",array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+                    "groups",array(get_ou("core", "groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
             // Walk through all POSIX groups
             foreach($groups as $group){
index e50de7e22e022610ba36d91feb7e65cc632abcb2..314867e2da3fa9ae123df7ea5a69839c2ad58e66 100644 (file)
@@ -866,7 +866,7 @@ class config  {
    */
   function getShareList($listboxEntry = false)
   {
-    $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverRDN"),
+    $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("servgeneric", "serverRDN"),
         $this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
     $return =array();
     foreach($tmp as $entry){
@@ -908,7 +908,7 @@ class config  {
     $ui = get_userinfo();
     $base = $config->current['BASE'];
     $res= get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))", "server",
-          get_ou("serverRDN"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK);
+          get_ou("servgeneric", "serverRDN"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK);
 
     foreach($res as $entry){
         
index 1b45db134f9d88a81b8c7421af14293805132468..612a6999e2714a2ba3e0a90e906f7aa546b6c99c 100644 (file)
@@ -860,7 +860,7 @@ class plugin
 
     // Migrate objectgroups if needed
     $ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
-      "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+      "ogroups", array(get_ou("group", "ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all objectGroups
     foreach($ogroups as $ogroup){
@@ -876,7 +876,7 @@ class plugin
     }
 
     // Migrate rfc groups if needed
-    $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+    $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("core", "groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all POSIX groups
     foreach($groups as $group){
@@ -887,7 +887,7 @@ class plugin
     }
 
     /* Update roles to use the new entry dn */
-    $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+    $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleGeneric", "roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all roles
     foreach($roles as $role){
index e7637663a920f936934e2ef2f586673fb0eddfd5..b66953840fe6f84100c9e3928942e4b598e1f7cd 100644 (file)
@@ -1396,7 +1396,7 @@ function get_sub_department($value)
  * Example:
  * \code
  * # Determine LDAP base where systems are stored
- * $base = get_ou('systemRDN') . $this->config->current['BASE'];
+ * $base = get_ou("systemManagement", "systemRDN") . $this->config->current['BASE'];
  * $ldap->cd($base);
  * \endcode
  * */
@@ -1473,7 +1473,7 @@ function get_ou($name)
  * */
 function get_people_ou()
 {
-  return (get_ou("userRDN"));
+  return (get_ou("core", "userRDN"));
 }
 
 
@@ -1483,7 +1483,7 @@ function get_people_ou()
  */
 function get_groups_ou()
 {
-  return (get_ou("groupRDN"));
+  return (get_ou("core", "groupRDN"));
 }
 
 
@@ -1493,7 +1493,7 @@ function get_groups_ou()
  */
 function get_winstations_ou()
 {
-  return (get_ou("sambaMachineAccountRDN"));
+  return (get_ou("wingeneric", "sambaMachineAccountRDN"));
 }
 
 
index 35151da1edd56fda344ef41f848101898873dfec..6c931dfd471bac7fd5157161d4e13bbb48920d21 100644 (file)
@@ -38,7 +38,7 @@ class aclManagement extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("aclRoleRDN")); // ACLs are attached to department containers
+    $this->storagePoints = array(get_ou("aclrole", "aclRoleRDN")); // ACLs are attached to department containers
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 28be2338567e20491201b33fb37ac71e510fe6ae..faa8214da81e2bdc3d32bf05e4dd6f591f973eb0 100644 (file)
@@ -35,7 +35,7 @@ class aclroletab extends tabs
 
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
-    $new_dn= 'cn='.$baseobject->cn.",".get_ou('aclRoleRDN').$baseobject->base;
+    $new_dn= 'cn='.$baseobject->cn.",".get_ou("aclrole", "aclRoleRDN").$baseobject->base;
 
     if ($this->dn != $new_dn){
 
index 70ad9abbd4b6b3dd68c123649325875df5ae3115..41fa63a3bed1ddbe094390059dd6adbf73e99ce5 100644 (file)
@@ -38,7 +38,7 @@ class groupManagement extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("groupRDN"));
+    $this->storagePoints = array(get_ou("core", "groupRDN"));
  
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index f17008ce81bdfd921cd408679ecc938c46adbd1e..5133828c80c1269c07efe49f46ac93a1a47dcdb0 100644 (file)
@@ -33,7 +33,7 @@ class singleUserSelect extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("userRDN"));
+    $this->storagePoints = array(get_ou("core", "userRDN"));
  
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 1a76fac6055a41868815d37ea5b602a9da813405..cedf4f71b1c4c734af3a736450c0b605de4338dc 100644 (file)
@@ -32,7 +32,7 @@ class userGroupSelect extends management
   {
     $this->config = $config;
     $this->ui = $ui;
-    $this->storagePoints = array(get_ou("userRDN"), get_ou("groupRDN"));
+    $this->storagePoints = array(get_ou("core", "userRDN"), get_ou("core", "groupRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index f5480b9d2b3f57bd0d2c1a949b48125f8dcf9ade..b52436495486205e62a14e664a9050a91e9e569b 100644 (file)
@@ -32,7 +32,7 @@ class userSelect extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("userRDN"));
+    $this->storagePoints = array(get_ou("core", "userRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 97af881672e44db8ef933f6a2059451e4b08b7b0..ee3496bcb86d2d1bcc5a5f86c31169bd03c80a5b 100644 (file)
@@ -102,7 +102,7 @@ class ogroup extends plugin
       $ui = get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
     } else {
-      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/i","",$this->dn);
+      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN"), '/')."/i","",$this->dn);
     }
 
     /* Detect all workstations, which are already assigned to an object group  
@@ -432,24 +432,24 @@ class ogroup extends plugin
         "departments"     => array("OBJ"=>"department", "CLASS"=>"gosaDepartment" ,
           "DN"=> ""                        ,"ACL" => "department"), 
         "servers"         => array("OBJ"=>"servgeneric", "CLASS"=>"goServer"       ,
-          "DN"=> get_ou('serverRDN')        ,"ACL" => "server"),
+          "DN"=> get_ou("servgeneric", "serverRDN")        ,"ACL" => "server"),
         "workstations"    => array("OBJ"=>"workgeneric", "CLASS"=>"gotoWorkstation",
-          "DN"=> get_ou('workstationRDN')   ,"ACL" => "workstation"),
+          "DN"=> get_ou("workgeneric", "workstationRDN")   ,"ACL" => "workstation"),
         "winstations"     => array("OBJ"=>"wingeneric", "CLASS"=>"opsiClient",        
           "DN"=> get_ou('SAMBAMACHINEACCOUNTRDN')     ,"ACL" => "winstation"),
         "terminals"       => array("OBJ"=>"termgeneric", "CLASS"=>"gotoTerminal"   ,
-          "DN"=> get_ou('terminalRDN')      ,"ACL" => "terminal"),
+          "DN"=> get_ou("termgeneric", "terminalRDN")      ,"ACL" => "terminal"),
         "printers"        => array("OBJ"=>"printgeneric", "CLASS"=>"gotoPrinter"    ,
-          "DN"=> get_ou('printerRDN')       ,"ACL" => "printer"),
+          "DN"=> get_ou("printgeneric", "printerRDN")       ,"ACL" => "printer"),
         "phones"          => array("OBJ"=>"phoneGeneric", "CLASS"=>"goFonHardware"  ,
-          "DN"=> get_ou('phoneRDN')         ,"ACL" => "phone"));
+          "DN"=> get_ou("phoneGeneric", "phoneRDN")         ,"ACL" => "phone"));
 
 
     /* Allow searching for applications, if we are not using release managed applications 
       */
     if(!$this->IsReleaseManagementActivated()){
       $p_f[      "applications"]    = array("OBJ"=>"application", "CLASS"=>"gosaApplication",
-          "DN"=> get_ou('applicationRDN')   ,"ACL" => "application"); 
+          "DN"=> get_ou("application", "applicationRDN")   ,"ACL" => "application"); 
     }
            
     /*###########
@@ -625,7 +625,7 @@ class ogroup extends plugin
 
     /* Permissions for that base? */
     if ($this->base != ""){
-      $new_dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base;
+      $new_dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN").$this->base;
     } else {
       $new_dn= $this->dn;
     }
@@ -703,7 +703,7 @@ class ogroup extends plugin
 
     /* New accounts need proper 'dn', propagate it to remaining objects */
     if ($this->dn == 'new'){
-      $this->dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base;
+      $this->dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN").$this->base;
     }
 
     /* Save data. Using 'modify' implies that the entry is already present, use 'add' for
index 54be3f263455f80ed83332a7f93c1be39feaaf11..d1c6cfa2e3550ccc8aa35a9760d9437fa2f38915 100644 (file)
@@ -38,7 +38,7 @@ class ogroupManagement extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("ogroupRDN"));
+    $this->storagePoints = array(get_ou("group", "ogroupRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index f406bd7f904ec8bf838c6e5790f6eb752b829712..e8a5abad5189dcc3204f53956b3a72221cfc78db 100644 (file)
@@ -33,13 +33,13 @@ class objectSelect extends management
     $this->config = $config;
     $this->ui = $ui;
     $this->storagePoints = array(
-        get_ou("userRDN"), 
-        get_ou("groupRDN"),
-        get_ou("terminalRDN"),
-        get_ou("workstationRDN"),
-        get_ou("serverRDN"),
-        get_ou("printerRDN"),
-        get_ou("phoneRDN"));
+        get_ou("core", "userRDN"), 
+        get_ou("core", "groupRDN"),
+        get_ou("termgeneric", "terminalRDN"),
+        get_ou("workgeneric", "workstationRDN"),
+        get_ou("servgeneric", "serverRDN"),
+        get_ou("printgeneric", "printerRDN"),
+        get_ou("phoneGeneric", "phoneRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index f7846ba3712157a700ac5057180e8598ef407352..a37b9b8acf1312bc54678a6becf2195c1843abf3 100644 (file)
@@ -344,7 +344,7 @@ class ogrouptabs extends tabs
 
         /* Check for new 'dn', in order to propagate the
            'dn' to all plugins */
-        $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base;
+        $new_dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN").$baseobject->base;
 
         /* Move group? */
         if (LDAP::fix($this->dn) != LDAP::fix($new_dn)){
@@ -360,7 +360,7 @@ class ogrouptabs extends tabs
         }
 
         if ($this->dn == "new"){
-            $this->dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base;
+            $this->dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN").$baseobject->base;
         }
 
         /* Only delete attributes if there are members left */
index f3a5429388d634da07909d8729ff621a2bd82434..d451a9aa31e5819a00f4d33f52b6d05df7084dba 100644 (file)
@@ -47,7 +47,7 @@ class userManagement extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("userRDN"));
+    $this->storagePoints = array(get_ou("core", "userRDN"));
  
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index a44296cf150d59af914024c8259075e4384ba6a7..b47d517d7adc6ee1d43ff4b2123571040788fd51 100644 (file)
@@ -33,7 +33,7 @@ class groupSelect extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("groupRDN"));
+    $this->storagePoints = array(get_ou("core", "groupRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 9b449a81c61ef477867736bacfdb05c21fb41eb8..b2ef0b6123118a4d6579c19185d68bb44d89e3d9 100644 (file)
@@ -33,7 +33,7 @@ class trustSelect extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("workstationRDN"),get_ou("terminalRDN"),get_ou("serverRDN"),);
+    $this->storagePoints = array(get_ou("workgeneric", "workstationRDN"),get_ou("termgeneric", "terminalRDN"),get_ou("servgeneric", "serverRDN"),);
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index ec5ce83c8d2ec963c6d31ad3a5815d534f0b4237..73f07459dbf767dc71d068f8bd740bc1d99d51b6 100644 (file)
@@ -667,7 +667,7 @@ class DNS
     
       $ret = array();
       $ldap = $config->get_ldap_link();
-      $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("serverRDN"),
+      $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("servgeneric", "serverRDN"),
           $config->current['BASE'],array("zoneName"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
 
       foreach($tmp as $at){
index f0c0a6d0140d5df83ed4490cd1bb1c5bb22b3105..d0e151712b77e0dcdf7a0194974dfbb8d25a94df 100644 (file)
@@ -381,7 +381,7 @@ class faiHook extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiHookRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiHook", "faiHookRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAIhook",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index d07cbe93daf7b0b5deb7b80714fad302156522df..9041bb00d7d80a695e4d19e56db41f2c77c7945f 100644 (file)
@@ -78,13 +78,13 @@ class faiManagement extends management
     $this->acl_base = $this->config->current['BASE'];
     $this->ui = $ui;
     $this->storagePoints = array(
-        get_ou('faiPartitionRDN'),
-        get_ou('faiPackageRDN'),
-        get_ou('faiScriptRDN'),
-        get_ou('faiVariableRDN'),
-        get_ou('faiHookRDN'),
-        get_ou('faiProfileRDN'),
-        get_ou('faiTemplateRDN'));
+        get_ou("faiPartitionTable", "faiPartitionRDN"),
+        get_ou("faiPackage", "faiPackageRDN"),
+        get_ou("faiScript", "faiScriptRDN"),
+        get_ou("faiVariable", "faiVariableRDN"),
+        get_ou("faiHook", "faiHookRDN"),
+        get_ou("faiProfile", "faiProfileRDN"),
+        get_ou("faiTemplate", "faiTemplateRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
@@ -602,9 +602,9 @@ class faiManagement extends management
 
           $ldap->cd($bb);
           $ldap->recursive_remove();
-          $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('applicationRDN'), $bb));
+          $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("application", "applicationRDN"), $bb));
           $ldap->recursive_remove();
-          $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('mimetypeRDN'), $bb));
+          $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou("mimetype", "mimetypeRDN"), $bb));
           $ldap->recursive_remove();
 
           /* Search for all groups with configured application menus.
@@ -761,11 +761,11 @@ class faiManagement extends management
 
       $targetReleaseDN = "ou=".$name.",".$baseToUse;
 
-      $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),$baseToUse);
-      $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),"ou=".$name.",".$baseToUse) ;
+      $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("application", "applicationRDN"),$baseToUse);
+      $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("application", "applicationRDN"),"ou=".$name.",".$baseToUse) ;
 
-      $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),$baseToUse);
-      $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),"ou=".$name.",".$baseToUse) ;
+      $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("mimetype", "mimetypeRDN"),$baseToUse);
+      $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou("mimetype", "mimetypeRDN"),"ou=".$name.",".$baseToUse) ;
 
       /* Check if source depeartments exist */
       foreach(array($baseToUse,$appsrc,$mimesrc) as $dep){
index 3657b9f6b1bed395182249711b0fa7d760085fb4..28631c25f52a513ad988771311d7fa0986b74360 100644 (file)
@@ -544,7 +544,7 @@ class faiPackage extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiPackageRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiPackage", "faiPackageRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAIpackageList",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index 9e4c14deaaa3f38a14aaf20ec8475666a867cc69..6f3630e6e54c2b8768198af0294f2bce6530a997 100644 (file)
@@ -481,7 +481,7 @@ class faiPartitionTable extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiPartitionRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAIpartitionTable",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index 2d6fb5b8ba73d2e435ca431409dfc32a63c79a94..80908909fc2a86f7aa1b4c2757b555f07bda8be1 100644 (file)
@@ -284,7 +284,7 @@ class faiProfile extends plugin
          */
         if($this->dn == "new" || $this->cn != $this->old_cn){
             $release = $this->parent->parent->fai_release;
-            $new_dn= 'cn='.$this->cn.",".get_ou('faiProfileRDN').get_ou('faiBaseRDN').$release;
+            $new_dn= 'cn='.$this->cn.",".get_ou("faiProfile", "faiProfileRDN").get_ou('faiBaseRDN').$release;
             $res = faiManagement::check_class_name("FAIprofile",$this->cn,$new_dn);
             if(isset($res[$this->cn])){
                 $message[] = msgPool::duplicated(_("Name"));
index d8283a973dcc6b0998dd9e8a275ac14c454d53c8..8575e6f8fadb03e75c9a05c87191e628ee338a56 100644 (file)
@@ -386,7 +386,7 @@ class faiScript extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiScriptRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiScript", "faiScriptRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAIscript",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index 16ab54023609f278bd52c43b9e2b84230b7d08b4..d6991f49c843fe7ee25ae491735c66cde4299a15 100644 (file)
@@ -41,13 +41,13 @@ class faiSummaryTab extends plugin{
 
     /* Base object configuration */
     $this->objs = array(       
-        "FAIscript"                => array(   "Image" =>"plugins/fai/images/fai_script.png",        "Name"=>_("Scripts")      ,"Tree" =>get_ou('faiScriptRDN')) ,
-        "FAIhook"                          => array(   "Image" =>"plugins/fai/images/fai_hook.png" ,         "Name"=>_("Hooks")        ,"Tree" =>get_ou('faiHookRDN')),
-        "FAIvariable"            => array(     "Image" =>"plugins/fai/images/fai_variable.png",      "Name"=>_("Variables")    ,"Tree" =>get_ou('faiVariableRDN')) ,
-        "FAItemplate"            => array(     "Image" =>"plugins/fai/images/fai_template.png",      "Name"=>_("Templates")    ,"Tree" =>get_ou('faiTemplateRDN')) ,
-        "FAIpartitionTable" => array(  "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table")  ,"Tree"     =>get_ou('faiPartitionRDN')) ,
-        "FAIpackageList"         => array(     "Image" =>"plugins/fai/images/fai_packages.png",      "Name"=>_("Package list") ,"Tree" =>get_ou('faiPackageRDN')) ,
-        "FAIprofile"               => array(   "Image" =>"plugins/fai/images/fai_profile.png",       "Name"=>_("Profiles")     ,"Tree" =>get_ou('faiProfileRDN')));
+        "FAIscript"                => array(   "Image" =>"plugins/fai/images/fai_script.png",        "Name"=>_("Scripts")      ,"Tree" =>get_ou("faiScript", "faiScriptRDN")) ,
+        "FAIhook"                          => array(   "Image" =>"plugins/fai/images/fai_hook.png" ,         "Name"=>_("Hooks")        ,"Tree" =>get_ou("faiHook", "faiHookRDN")),
+        "FAIvariable"            => array(     "Image" =>"plugins/fai/images/fai_variable.png",      "Name"=>_("Variables")    ,"Tree" =>get_ou("faiVariable", "faiVariableRDN")) ,
+        "FAItemplate"            => array(     "Image" =>"plugins/fai/images/fai_template.png",      "Name"=>_("Templates")    ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN")) ,
+        "FAIpartitionTable" => array(  "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table")  ,"Tree"     =>get_ou("faiPartitionTable", "faiPartitionRDN")) ,
+        "FAIpackageList"         => array(     "Image" =>"plugins/fai/images/fai_packages.png",      "Name"=>_("Package list") ,"Tree" =>get_ou("faiPackage", "faiPackageRDN")) ,
+        "FAIprofile"               => array(   "Image" =>"plugins/fai/images/fai_profile.png",       "Name"=>_("Profiles")     ,"Tree" =>get_ou("faiProfile", "faiProfileRDN")));
   }
 
 
@@ -69,7 +69,7 @@ class faiSummaryTab extends plugin{
       /* Get Classes and release */
       $this->Classes = $this->parent->by_object['faiProfile']->FAIclasses;
       $this->base    = $this->parent->by_object['faiProfile']->parent->parent->fai_release;
-      $str = preg_replace("/^.*".preg_quote(get_ou('faiProfileRDN'), '/')."/i","",$this->dn);
+      $str = preg_replace("/^.*".preg_quote(get_ou("faiProfile", "faiProfileRDN"), '/')."/i","",$this->dn);
       $tmp  = $this->parent->by_object['faiProfile']->parent->parent->getBranches();
       $this->Release = $tmp[$this->base];
   
index 4ece4344c030ba81d9190eef9c3e9a4c92da017f..b370dd6c9dcb53f3ff5d4d0976c1d31707aeb031 100644 (file)
@@ -404,7 +404,7 @@ class faiTemplate extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiTemplateRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiTemplate", "faiTemplateRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAItemplate",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index 78546c48361f1cee7689e2377baf375726243336..9de8ee3123c4a89b9aec27c663fe99f0028c945c 100644 (file)
@@ -290,7 +290,7 @@ class faiVariable extends plugin
      */
     if($this->is_new){
       $release = $this->parent->parent->fai_release;
-      $new_dn= 'cn='.$this->cn.",".get_ou('faiVariableRDN').get_ou('faiBaseRDN').$release;
+      $new_dn= 'cn='.$this->cn.",".get_ou("faiVariable", "faiVariableRDN").get_ou('faiBaseRDN').$release;
       $res = faiManagement::check_class_name("FAIvariable",$this->cn,$new_dn);
       if(isset($res[$this->cn])){
         $message[] = msgPool::duplicated(_("Name"));
index 155b95e4730772a9abb42af1a52db657c8940903..86f2e989b44f19929437b6c506a1dcb8e6c82a93 100644 (file)
@@ -8,19 +8,19 @@ class filterFAI extends filterLDAP{
      * Generate List of Partitions,Hooks,Scripts,Templates,Profiles ...
      */
     $ObjectTypes = array(
-        "FAIpartitionTable"  => array("OU"=> get_ou('faiPartitionRDN') , "CHKBOX"=>"ShowPartitions"  ,
+        "FAIpartitionTable"  => array("OU"=> get_ou("faiPartitionTable", "faiPartitionRDN") , "CHKBOX"=>"ShowPartitions"  ,
           "ACL" => "faiPartitionTable"),
-        "FAIpackageList"     => array("OU"=> get_ou('faiPackageRDN')   , "CHKBOX"=>"ShowPackages"    ,
+        "FAIpackageList"     => array("OU"=> get_ou("faiPackage", "faiPackageRDN")   , "CHKBOX"=>"ShowPackages"    ,
           "ACL" => "faiPackage"),
-        "FAIscript"          => array("OU"=> get_ou('faiScriptRDN')    , "CHKBOX"=>"ShowScripts"     ,
+        "FAIscript"          => array("OU"=> get_ou("faiScript", "faiScriptRDN")    , "CHKBOX"=>"ShowScripts"     ,
           "ACL" => "faiScript"),
-        "FAIvariable"        => array("OU"=> get_ou('faiVariableRDN')  , "CHKBOX"=>"ShowVariables"   ,
+        "FAIvariable"        => array("OU"=> get_ou("faiVariable", "faiVariableRDN")  , "CHKBOX"=>"ShowVariables"   ,
           "ACL" => "faiVariable"),
-        "FAIhook"            => array("OU"=> get_ou('faiHookRDN')      , "CHKBOX"=>"ShowHooks"       ,
+        "FAIhook"            => array("OU"=> get_ou("faiHook", "faiHookRDN")      , "CHKBOX"=>"ShowHooks"       ,
           "ACL" => "faiHook"),
-        "FAIprofile"         => array("OU"=> get_ou('faiProfileRDN')   , "CHKBOX"=>"ShowProfiles"    ,
+        "FAIprofile"         => array("OU"=> get_ou("faiProfile", "faiProfileRDN")   , "CHKBOX"=>"ShowProfiles"    ,
           "ACL" => "faiProfile"),
-        "FAItemplate"        => array("OU"=> get_ou('faiTemplateRDN')  , "CHKBOX"=>"ShowTemplates"   ,
+        "FAItemplate"        => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN")  , "CHKBOX"=>"ShowTemplates"   ,
           "ACL" => "faiTemplate"));
 
 
index 40c997c767e8378f8b81c71c26c294a2683db3dc..a271f73ed13598d286ce4ebeb8f8ee1bd381211f 100644 (file)
@@ -21,7 +21,7 @@ class tabsHook extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiHook'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiHookRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiHook", "faiHookRDN").$this->parent->fai_release;
 
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 835933f79a9617d484b2f48688242ebe11274544..f3111f4a0221ca922a0fbfb3886e1d2ecc7792fc 100644 (file)
@@ -22,7 +22,7 @@ class tabsPackage extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiPackage'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPackageRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPackage", "faiPackageRDN").$this->parent->fai_release;
                        
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 3ac0e2257d92261f9e529183851860b777e61893..706658d669a945978e453abdd01a5c85506b4031 100644 (file)
@@ -23,7 +23,7 @@ class tabsPartition extends tabs
   {
        $baseobject= $this->by_object['faiPartitionTable'];
 
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPartitionRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN").$this->parent->fai_release;
 
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 3773637e0f4079ab251075b79bd2736d106f55d2..ac147a50f36e7360bbcf0dd69c84153fc2bf7512 100644 (file)
@@ -22,7 +22,7 @@ class tabsProfile extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiProfile'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiProfileRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiProfile", "faiProfileRDN").$this->parent->fai_release;
                        
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 7cf0a027e2fd887c1991104ba7e07c49f8c16d4f..02e27c7b529f45d5a4352ac2624732acd3419863 100644 (file)
@@ -22,7 +22,7 @@ class tabsScript extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiScript'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiScriptRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiScript", "faiScriptRDN").$this->parent->fai_release;
        
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index e47096fd32b3782c39e208712faca501967f784a..6c5e41b7fa747d5cd46fb1603dba3a9986c8e442 100644 (file)
@@ -22,7 +22,7 @@ class tabsTemplate extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiTemplate'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiTemplateRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiTemplate", "faiTemplateRDN").$this->parent->fai_release;
 
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 5a636be08f206391d354ba452ea3d9924147e5d9..dd38c1b7eb0c644dc5637103d03f6bca3dd41e81 100644 (file)
@@ -22,7 +22,7 @@ class tabsVariable extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['faiVariable'];
-       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiVariableRDN').$this->parent->fai_release;
+       $new_dn ='cn='.$baseobject->cn.",".get_ou("faiVariable", "faiVariableRDN").$this->parent->fai_release;
                        
        if ($this->dn != $new_dn && $this->dn != "new"){
                
index 05c41436d11097d15e6f6c4038acf838356ca9cc..5683258e806dcbe618069ccdec3cbf24ee7141ea 100644 (file)
@@ -69,7 +69,7 @@ class blocklistGeneric extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("faxBlocklistRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("blocklistGeneric", "faxBlocklistRDN"), '/')."/i", "", $this->dn);
     }
     
     $this->orig_base = $this->base;
@@ -216,7 +216,7 @@ class blocklistGeneric extends plugin
       }
       if ($this->dn == 'new'){
         $ldap= $this->config->get_ldap_link();
-        $ldap->cd (get_ou('faxBlocklistRDN').$this->config->current["BASE"]);
+        $ldap->cd (get_ou("blocklistGeneric", "faxBlocklistRDN").$this->config->current["BASE"]);
         $ldap->search ("(&(|(objectClass=goFaxSBlock)(objectClass=goFaxRBlock))(cn=".$this->cn."))", array("cn"));
         if ($ldap->count() != 0){
           $message[]= msgPool::duplicated(_("Name"));
index 4f59ce256a576cf81bfeb69b187bd262cc5b2c09..3afc620ad639bc369fc5cc84c1cb77315a2acbd4 100644 (file)
@@ -38,7 +38,7 @@ class blocklist extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("faxBlocklistRDN"));
+    $this->storagePoints = array(get_ou("blocklistGeneric", "faxBlocklistRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 54a378674caab0e73b02d45936497184023e5f37..79c879ed67c57d2e0f800fd6400f5ffe156a2aa8 100644 (file)
@@ -15,7 +15,7 @@ class faxblocktabs extends tabs
     $baseobject= $this->by_object['blocklistGeneric'];
 
     /* Check for new 'dn', in order to propagate the 'dn' to all plugins */
-    $new_dn= "cn=".$baseobject->cn.",".get_ou('faxBlocklistRDN').$baseobject->base;
+    $new_dn= "cn=".$baseobject->cn.",".get_ou("blocklistGeneric", "faxBlocklistRDN").$baseobject->base;
 
     /* Move group? */
     if ($this->dn != $new_dn){
index f995d0d3f992cc8b6760ae39e5f1ea62663dda7a..ccac9544f7d489767e251f7311d16f147b053e9a 100644 (file)
@@ -32,7 +32,7 @@ class faxNumberSelect extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("userRDN"));
+    $this->storagePoints = array(get_ou("core", "userRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index b5ef3d31801498a66566a5e77f7fe914b293d298..a3bfe73ef518bc234274e6de5f53ac76edb2465c 100644 (file)
@@ -64,7 +64,7 @@ class phoneGeneric extends plugin
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneGeneric", "phoneRDN"), '/')."/i", "", $this->dn);
     }
   
     if($this->goFonMSN != ""){
@@ -301,7 +301,7 @@ class phoneGeneric extends plugin
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
 
-    $this->dn= "cn=".$this->cn.",".get_ou('phoneRDN').$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou("phoneGeneric", "phoneRDN").$this->base;
 
     /* To check for valid ip*/
     if($this->netConfigDNS->ipHostNumber == ""){
index b8a85905814a36caa918fb90ac3754f0303f27bd..f18188b08e8fe8b23121530d6a6b3f086ac3bcc0 100644 (file)
@@ -25,7 +25,7 @@ class phonetabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['phoneGeneric'];
-    $this->dn= "cn=$baseobject->cn,".get_ou('phoneRDN').$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou("phoneGeneric", "phoneRDN").$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){
index eb56f14a8085c659cc52998ad3970936cb9856cd..399a3aef8fe5e8ac341a34e397ea9a00633f4373 100644 (file)
@@ -118,7 +118,7 @@ class conference extends plugin
     } else {
 
       /* Get base */ 
-      $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('phoneConferenceRDN'), '/')."/i","",$this->dn);;
+      $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou("conference", "phoneConferenceRDN"), '/')."/i","",$this->dn);;
     }
 
     $this->goFonConferenceOwner=$this->ui->dn;
@@ -383,7 +383,7 @@ class conference extends plugin
 
     if($this->old_cn != $this->cn || $this->base != $this->old_base){
       $ldap = $this->config->get_ldap_link();
-      $ldap->cd(get_ou('phoneConferenceRDN').$this->base);
+      $ldap->cd(get_ou("conference", "phoneConferenceRDN").$this->base);
       $ldap->search("(&(objectClass=goFonConference)(cn=".$this->cn."))",array("cn"));
       if($ldap->count()){
         $message[] = msgPool::duplicated(_("Name"));
index 113eb5075299b4fff6db363d301b589633718ed5..29867ddaeda8b9ef22a157b791e8441dce81f634 100644 (file)
@@ -38,7 +38,7 @@ class phoneConferenceManagment extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("phoneConferenceRDN"));
+    $this->storagePoints = array(get_ou("conference", "phoneConferenceRDN"));
  
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 8d51b1f9bb95bde204288502fbf20838a6b38e59..35038a579067fe09e610f3679ee1524cdde21ade 100644 (file)
@@ -22,7 +22,7 @@ class conferencetabs extends tabs
   function save($ignore_account= FALSE)
   {
        $baseobject= $this->by_object['conference'];
-       $new_dn= 'cn='.$baseobject->cn.','.get_ou('phoneConferenceRDN').$baseobject->base;
+       $new_dn= 'cn='.$baseobject->cn.','.get_ou("conference", "phoneConferenceRDN").$baseobject->base;
 
        if(strtolower($this->dn)==strtolower($new_dn)){
                $this->dn=$new_dn;
index fc9f8809da04442666d84ba95fc6249f5be56e24..63424cd41aabdbbc459c4108f6d03a39dc9d64c4 100644 (file)
@@ -64,7 +64,7 @@ class macro extends plugin
       }
     } else {
       $this->orig_cn=$this->cn;
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneMacroRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("macro", "phoneMacroRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Check server configurations
index af074a93638c1701f22d204f350ee43859131b63..90f93733747ef1b83d12a7e08cb1e51d0bab17d6 100644 (file)
@@ -39,7 +39,7 @@ class goFonMacro extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("phoneMacroRDN"));
+    $this->storagePoints = array(get_ou("macro", "phoneMacroRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index f874015e40b23674dff177b529105e059e96bf49..e797fb8812d64d7b7f11044178737310f9b19475 100644 (file)
@@ -17,7 +17,7 @@ class macrotabs extends tabs
 
        /* Check for new 'dn', in order to propagate the
           'dn' to all plugins */
-       $new_dn= "cn=".$baseobject->cn.",".get_ou('phoneMacroRDN').$baseobject->base;
+       $new_dn= "cn=".$baseobject->cn.",".get_ou("macro", "phoneMacroRDN").$baseobject->base;
 
         /* Move group? */
         if ($this->dn != $new_dn){
index 672f51c391c19ad22c5ce8c52b42587a5b2d0fbf..c12bc487f17ddf62cd65544d5e9bb3f34fcd8d91 100644 (file)
@@ -165,7 +165,7 @@ class phoneAccount extends plugin
     /* Get available phone hardware  
      * Search for all available phone hardware  
      */
-    $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneRDN")),
+    $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneGeneric", "phoneRDN")),
                   $this->config->current['BASE'],array("cn","description"), GL_SUBSEARCH);
     foreach($tmp as $attrs){
       $cn= $attrs['cn'][0];
@@ -184,13 +184,13 @@ class phoneAccount extends plugin
      */
     $deps_a = array(
         get_people_ou(),
-        get_ou("ogroupRDN"),
-        get_ou("serverRDN"),
-        get_ou("terminalRDN"),
-        get_ou("workstationRDN"),
-        get_ou("printerRDN"),
-        get_ou("componentRDN"),
-        get_ou("phoneRDN"));
+        get_ou("group", "ogroupRDN"),
+        get_ou("servgeneric", "serverRDN"),
+        get_ou("termgeneric", "terminalRDN"),
+        get_ou("workgeneric", "workstationRDN"),
+        get_ou("printgeneric", "printerRDN"),
+        get_ou("componentGeneric", "componentRDN"),
+        get_ou("phoneGeneric", "phoneRDN"));
 
     $tmp = get_sub_list("(goFonHardware=*)","phone",$deps_a,$this->config->current['BASE'],
         array('cn','dn','goFonHardware'),GL_SUBSEARCH);
@@ -206,7 +206,7 @@ class phoneAccount extends plugin
      * Search for all Macros that are visible and create 
      *  an array with name and parameters 
      */
-    $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("phoneMacroRDN")),
+    $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("macro", "phoneMacroRDN")),
                   $this->config->current['BASE'],array("displayName","goFonMacroParameter","dn","cn"), GL_NO_ACL_CHECK | GL_SUBSEARCH );
     
 
index f7ba9ec8e30a0839dbd90c7f9e12fde1282e4eb6..cb20ebed31432bf7818d1d17500b16511c41d008 100644 (file)
@@ -31,10 +31,10 @@ class EventAddSystemDialog extends management
     $this->config = $config;
     $this->ui = $ui;
     $this->storagePoints = array(
-        get_ou("serverRDN"), 
-        get_ou("workstationRDN"), 
-        get_ou("ogroupRDN"), 
-        get_ou('terminalRDN'));
+        get_ou("servgeneric", "serverRDN"), 
+        get_ou("workgeneric", "workstationRDN"), 
+        get_ou("group", "ogroupRDN"), 
+        get_ou("termgeneric", "terminalRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 0649761c88422e0a946242bf1f8adc21979a691f..85aac618500b571e33389c1a0023e4759a3c71a9 100644 (file)
@@ -31,8 +31,8 @@ class EventAddUserDialog extends management
     $this->config = $config;
     $this->ui = $ui;
     $this->storagePoints = array(
-        get_ou("userRDN"), 
-        get_ou("groupRDN")); 
+        get_ou("core", "userRDN"), 
+        get_ou("core", "groupRDN")); 
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index bf11b1f7aba247fc43dd11fe70a9124912a42532..84ac3d16a171eb9681e9cd0ce48972e09d96016f 100644 (file)
@@ -59,7 +59,7 @@ class application extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou('applicationRDN'), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("application", "applicationRDN"), '/')."/i", "", $this->dn);
     }
 
     $this->orig_cn = $this->cn;
@@ -209,7 +209,7 @@ class application extends plugin
   function remove_from_parent()
   {
     /* Parse release out of object dn */
-    $release = preg_replace("/".preg_quote(get_ou("applicationRDN").$this->base, '/')."$/i","",$this->dn);
+    $release = preg_replace("/".preg_quote(get_ou("application", "applicationRDN").$this->base, '/')."$/i","",$this->dn);
     $release = preg_replace("/^cn=[^,]+,/","",$release);
 
     /* Get a list of all groups 
@@ -404,7 +404,7 @@ class application extends plugin
 
     /* Permissions for that base? */
     if ($this->base != ""){
-      $new_dn= "cn=".$this->cn.",".get_ou('applicationRDN').$this->base;
+      $new_dn= "cn=".$this->cn.",".get_ou("application", "applicationRDN").$this->base;
     } else {
       $new_dn= $this->dn;
     }
@@ -433,7 +433,7 @@ class application extends plugin
     if($this->is_release()){
       $base = $this->parent->parent->app_release;
     }else{
-      $base = get_ou('applicationRDN').$this->base;
+      $base = get_ou("application", "applicationRDN").$this->base;
     }
 
     $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$base,array("cn"));
index 3cd74a415ee67d604dae69a7711c92027591ab19..d468b4c2e813e42435088ca10e9ec6b865f1f1db 100644 (file)
@@ -42,8 +42,8 @@ class applicationManagement extends management
   {
     $this->config = $config;
     $this->ui = $ui;
-    $this->app_base    = get_ou('applicationRDN').$this->config->current['BASE'];
-    $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
+    $this->app_base    = get_ou("application", "applicationRDN").$this->config->current['BASE'];
+    $this->app_release = get_ou("application", "applicationRDN").$this->config->current['BASE'];
 
     if($this->IsReleaseManagementActivated()){
       $filter_xml = "application-filter-release.xml";
@@ -54,7 +54,7 @@ class applicationManagement extends management
     }else{
       $filter_xml = "application-filter.xml";
       $list_xml = "application-list.xml";
-      $this->storagePoints= array(get_ou("applicationRDN"));
+      $this->storagePoints= array(get_ou("application", "applicationRDN"));
     }
 
     // Build filter
index bf7a311f27bc76114d6e7572b4b39ee82ffbf475..eea2a1a45200a357e9bdaa42d4326d9ae17ff515 100644 (file)
@@ -30,7 +30,7 @@ class apptabs extends tabs
     if($baseobject->parent->parent->IsReleaseManagementActivated()){
       $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
     }else{
-      $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
+      $new_dn= "cn=".$baseobject->cn.",".get_ou("application", "applicationRDN").$baseobject->base;
     }
     
     // Do we have to move the object?
index 037963de6088bed57a04b39341881eeb0f984fd5..693fe19f957217b80d22b50ee63cc72b4817a55b 100644 (file)
@@ -56,7 +56,7 @@ class deviceGeneric extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou('deviceRDN'), '/')."/i","",$this->dn);
+      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou("deviceGeneric", "deviceRDN"), '/')."/i","",$this->dn);
     }
     $this->orig_base = $this->base;
     $this->orig_dn   = $this->dn;
index 7ec0081b59cd2ce27ed401237dec1bd7135aea24..133537b34bfbeb9e616ceb6735e6145aaf27754c 100644 (file)
@@ -42,7 +42,7 @@ class deviceManagement extends management
 
     $filter_xml = "device-filter.xml";
     $list_xml = "device-list.xml";
-    $this->storagePoints= array(get_ou("deviceRDN"));
+    $this->storagePoints= array(get_ou("deviceGeneric", "deviceRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index e2b49799385024dc60971ddce09f271dac46b669..518fe8469ca755c0dc3fef872d30a5158d3dfc0a 100644 (file)
@@ -15,7 +15,7 @@ class devicetabs extends tabs
   function save($ignore_account= FALSE)
   {
     $baseobject= $this->by_object['deviceGeneric'];
-    $new_dn= "cn=".$baseobject->cn.",".get_ou('deviceRDN').$baseobject->base;
+    $new_dn= "cn=".$baseobject->cn.",".get_ou("deviceGeneric", "deviceRDN").$baseobject->base;
 
     /* Move group? */
     if ($this->dn != $new_dn){
index 2f6e60a2ca39c6a2ee1646ad86604df75f4714d6..56fc4ace693aa00ccb208538b19c602cabc67136 100644 (file)
@@ -148,26 +148,26 @@ class appgroup extends plugin
     */
   function getReleases()
   {
-    $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou('applicationRDN')));
+    $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou("application", "applicationRDN")));
     if($this->enableReleaseManagement){
 
       /* Only display those releases that we are able to read 
        */
-      $dn     = get_ou("applicationRDN").$this->config->current['BASE'];
+      $dn     = get_ou("application", "applicationRDN").$this->config->current['BASE'];
       $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))";
       $res    = get_sub_list($filter,array("application","fai"), 
-          array(get_ou("applicationRDN"),get_ou("faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH);
+          array(get_ou("application", "applicationRDN"),get_ou("faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH);
 
       /* Go through all departments and check which department is a valid 
           department release.
        */
       foreach($res as $attrs){
-        if(preg_match("/".get_ou('applicationRDN')."/i",$attrs['dn'])){
+        if(preg_match("/".get_ou("application", "applicationRDN")."/i",$attrs['dn'])){
 
           /* Parse all returned departments dns into a useable type.
              (ou=1.0.0,ou=halut,ou=apps  ==> halue/1.0.0)
            */
-          $bb     = preg_replace("/".preg_quote(get_ou('applicationRDN'), '/').".*/i","",$attrs['dn']);
+          $bb     = preg_replace("/".preg_quote(get_ou("application", "applicationRDN"), '/').".*/i","",$attrs['dn']);
           $parts  = array_reverse(explode("ou=",$bb));
 
           $str ="";
@@ -205,7 +205,7 @@ class appgroup extends plugin
               "found"    => $found,
               "FAIstate" => $FAIstate,
               "dn"       => $attrs['dn'], 
-              "parts"    => $parts,"suffix" => $bb.get_ou('applicationRDN'));
+              "parts"    => $parts,"suffix" => $bb.get_ou("application", "applicationRDN"));
         }
       }
     }
@@ -466,7 +466,7 @@ class appgroup extends plugin
     $used_apps = $this->_get_used_entry_name();
     foreach($this->apps as $key => $app){
         if(in_array($app['cn'][0],$used_apps)) continue;
-        if(!preg_match("/".get_ou('applicationRDN').preg_quote($this->curbase, '/')."$/",$app['dn'])){
+        if(!preg_match("/".get_ou("application", "applicationRDN").preg_quote($this->curbase, '/')."$/",$app['dn'])){
             continue;
         }
 
index 2b85b69d571e07259a05787bf6db7fbaa40639ec..fcedd704353da3b2a2444dbe95f793e136e59573 100644 (file)
@@ -126,7 +126,7 @@ class mimetype extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetype", "mimetypeRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Get icon data */
@@ -524,7 +524,7 @@ class mimetype extends plugin
     if($this->is_release()){
       $base = $this->parent->parent->mime_release;
     }else{
-      $base = get_ou("mimetypeRDN").$this->base;
+      $base = get_ou("mimetype", "mimetypeRDN").$this->base;
     }
 
     $ldap->ls("(&(objectClass=gotoMimeType)(cn=".$this->cn."))",$base,array("cn"));
index 5c287006c39be6886bd64a9ee475872ee97f47be..fa0bb955df57ab7dba8739b252cb2ea8aa8db2cb 100644 (file)
@@ -42,8 +42,8 @@ class mimetypeManagement extends management
   {
     $this->config = $config;
     $this->ui = $ui;
-    $this->mime_base = get_ou('mimetypeRDN').$this->config->current['BASE'];
-    $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE'];
+    $this->mime_base = get_ou("mimetype", "mimetypeRDN").$this->config->current['BASE'];
+    $this->mime_release = get_ou("mimetype", "mimetypeRDN").$this->config->current['BASE'];
 
     if($this->IsReleaseManagementActivated()){
       $filter_xml = "mimetype-filter-release.xml";
@@ -54,7 +54,7 @@ class mimetypeManagement extends management
     }else{
       $filter_xml = "mimetype-filter.xml";
       $list_xml = "mimetype-list.xml";
-      $this->storagePoints= array(get_ou("mimetypeRDN"));
+      $this->storagePoints= array(get_ou("mimetype", "mimetypeRDN"));
     }
 
     // Build filter
index dacda448687497bbe79d4925737e05ab1c7a10cd..6244c0623acf1eff7ae4ac103cea62d007f70b9a 100644 (file)
@@ -30,7 +30,7 @@ class mimetabs extends tabs
     if($this->parent->IsReleaseManagementActivated()){
       $new_dn= "cn=".$baseobject->cn.",".$this->parent->mime_release;
     }else{
-      $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeRDN').$baseobject->base;
+      $new_dn= "cn=".$baseobject->cn.",".get_ou("mimetype", "mimetypeRDN").$baseobject->base;
     }
 
     /* Move group? */
index c420b2f1d5d93f893d7002ac93fa0271c5a46c02..7bd5622c199213c569061050a4d1c425a09dcac1 100644 (file)
@@ -71,11 +71,11 @@ class printgeneric extends plugin
 
     /* Update dn, to ensure storing as printer instead of WS / terminal */
     if(preg_match("/Terminal/i",$this->BelongsTo) || preg_match("/TerminalTemplate/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
     }
 
     if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
     }
 
     $this->orig_dn = $this->dn;
@@ -104,10 +104,10 @@ class printgeneric extends plugin
     } else {
     
       /* Set base and check if the extracted base exists */
-      if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->dn)){
-        $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i","",dn2base($this->dn));
+      if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->dn)){
+        $this->base= preg_replace("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i","",dn2base($this->dn));
       }else{
-        $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/i","",dn2base($this->dn));
+        $this->base= preg_replace("/".preg_quote(get_ou("printgeneric", "printerRDN"), '/')."/i","",dn2base($this->dn));
       }
 
       if(!isset($this->config->idepartments[$this->base])){
@@ -256,11 +256,11 @@ class printgeneric extends plugin
       /* Update dn, to ensure storing as printer instead of WS / terminal
        */
       if(preg_match("/terminal/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
       }
 
       if(preg_match("/workstation/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
       }
 
       /* Detect if this is a valid printer account;
@@ -625,11 +625,11 @@ class printgeneric extends plugin
       /* Update dn, to ensure storing as printer instead of WS / terminal
        */
       if(preg_match("/terminal/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/i",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/').",/i",get_ou("printgeneric", "printerRDN"),$this->dn);
       }
 
       if(preg_match("/workstation/i",$this->BelongsTo)){
-        $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+        $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
       }
 
       /* Check if this dn points to a printer, to avoid deleting something else */
@@ -727,7 +727,7 @@ class printgeneric extends plugin
       }
     }
 
-    $dn= "cn=".$this->cn.get_ou('printerRDN').",".$this->base;
+    $dn= "cn=".$this->cn.get_ou("printgeneric", "printerRDN").",".$this->base;
 
     /* must: cn */
     if(($this->BelongsTo == "Printer") && $this->cn == ""){
@@ -753,7 +753,7 @@ class printgeneric extends plugin
     if (($this->orig_dn != $dn)&&( preg_match("/printer/i",$this->BelongsTo))){
       $ldap= $this->config->get_ldap_link();
       $ldap->cd ($this->base);
-      $ldap->ls("(cn=".$this->cn.")",get_ou('printerRDN').$this->base, array("cn"));
+      $ldap->ls("(cn=".$this->cn.")",get_ou("printgeneric", "printerRDN").$this->base, array("cn"));
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
           if(preg_match("/cn=dhcp,/",$attrs['dn'])){
@@ -785,11 +785,11 @@ class printgeneric extends plugin
     /* Update dn, to ensure storing as printer instead of WS / terminal
      */
     if(preg_match("/terminal/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
     }
 
     if(preg_match("/workstation/i",$this->BelongsTo)){
-      $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
+      $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i",get_ou("printgeneric", "printerRDN"),$this->dn);
     }
     
     if(!$this->is_account) return;
@@ -921,7 +921,7 @@ class printgeneric extends plugin
     }
 
     /* Ensure to create a new object */
-    if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->orig_dn)){
+    if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
       $this->orig_dn = "new";
     }
 
index 6564b864c05b8af0695e334be69ae61e635bf09b..add8d2ba7ffce7f278db9e208cccf05945e92bcd 100644 (file)
@@ -125,10 +125,10 @@ class termgeneric extends plugin
     if ($this->dn == "new"){
       $ui= get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
-    } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+    } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn);
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Create an array of all Syslog servers */
@@ -420,7 +420,7 @@ class termgeneric extends plugin
     }
 
     /* Permissions for that base? */
-    $this->dn= "cn=".$this->cn.",".get_ou('terminalRDN').$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou("termgeneric", "terminalRDN").$this->base;
 
     if ($this->cn == ""){
       $message[]= msgPool::required(_("Name"));
@@ -448,7 +448,7 @@ class termgeneric extends plugin
       }
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
-          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
+          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $ldap->getDN())){
             continue;
           } else {
             if ($attrs['dn'] != $this->orig_dn){
@@ -493,7 +493,7 @@ class termgeneric extends plugin
       $ldap= $this->config->get_ldap_link();
 
       /* Strip relevant part from dn, keep trailing ',' */
-      $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
+      $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn);
       $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
 
       /* Walk from top to base and try to load default values for
@@ -501,7 +501,7 @@ class termgeneric extends plugin
       while (TRUE){
         $tmp= preg_replace ("/^[^,]+,/", "", $tmp);
 
-        $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp.
+        $ldap->cat("cn=default,".get_ou("termgeneric", "terminalRDN").$tmp.
             $this->config->current['BASE'], array('gotoTerminalPath'));
         $attrs= $ldap->fetch();
         if (isset($attrs['gotoTerminalPath'])){
index 28846fd5049d62352e1918fbde38063deb774000..9d1f4ed7497877e9935e09ddacbe18a40f2b5170 100644 (file)
@@ -198,7 +198,7 @@ class termservice extends plugin
 
     /* Load phone hardware list 
      */
-    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")), 
+    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneGeneric", "phoneRDN")), 
                   $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
     foreach($tmp as $attrs){
       $cn= $attrs['cn'][0];
@@ -216,13 +216,13 @@ class termservice extends plugin
      */
     $deps_a = array(
         get_people_ou(),
-        get_ou("ogroupRDN"),
-        get_ou("serverRDN"),
-        get_ou("terminalRDN"),
-        get_ou("workstationRDN"),
-        get_ou("printerRDN"),
-        get_ou("componentRDN"),
-        get_ou("phoneRDN"));
+        get_ou("group", "ogroupRDN"),
+        get_ou("servgeneric", "serverRDN"),
+        get_ou("termgeneric", "terminalRDN"),
+        get_ou("workgeneric", "workstationRDN"),
+        get_ou("printgeneric", "printerRDN"),
+        get_ou("componentGeneric", "componentRDN"),
+        get_ou("phoneGeneric", "phoneRDN"));
 
     $tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'],
         array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
@@ -650,7 +650,7 @@ class termservice extends plugin
            */
           $p = $this->parent->by_object['ogroup'];
           foreach($p->memberList as $dn => $obj){
-            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
+            if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$dn)) continue;
             if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
               $macs[] = $p->objcache[$dn]['macAddress'];
             }
@@ -660,7 +660,7 @@ class termservice extends plugin
           /* We are a workstation. Add current mac.
            */
           $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
-          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
+          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$this->orig_dn)){
             $macs[] = $mac;
           }
         }
index b5ff4338ccee2d54b42253e8b04a8157c10400a4..777198691f2e739b60c28e480faec6c4a548881b 100644 (file)
@@ -141,10 +141,10 @@ class workgeneric extends plugin
     if ($this->dn == "new"){
       $ui= get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
-    } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+    } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn);
     }else{
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workstationRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN"), '/')."/i", "", $this->dn);
     }
 
     /* Create an array of all Syslog servers */
@@ -429,7 +429,7 @@ class workgeneric extends plugin
       $message= array_merge($message, $this->netConfigDNS->check());
     }
 
-    $this->dn= "cn=".$this->cn.",".get_ou('workstationRDN').$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou("workgeneric", "workstationRDN").$this->base;
 
     if ($this->cn == ""){
       $message[]= msgPool::required(_("Name"));
@@ -456,7 +456,7 @@ class workgeneric extends plugin
       }
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
-          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
+          if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $ldap->getDN())){
             continue;
           } else {
             if ($attrs['dn'] != $this->orig_dn){
@@ -486,7 +486,7 @@ class workgeneric extends plugin
     }else{
       /* Warn the user, that this host is currently installing */
       if($this->currently_installing && !$this->currently_installing_warned && 
-          !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
+          !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
       
         /* Force aborting without message dialog */
         $message[] = "";
index 4b131ec53ee2d3e83809d10751cecb9a8337ada9..5cf847b1bb0b107e16b3398906eae458cb8bac4d 100644 (file)
@@ -137,7 +137,7 @@ class workservice extends plugin
 
     /* Load phone hardware list
      */
-    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")),
+    $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneGeneric", "phoneRDN")),
                   $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
     foreach($tmp as $attrs){
       $cn= $attrs['cn'][0];
@@ -155,13 +155,13 @@ class workservice extends plugin
      */
     $deps_a = array(
         get_people_ou(),
-        get_ou("ogroupRDN"),
-        get_ou("serverRDN"),
-        get_ou("terminalRDN"),
-        get_ou("workstationRDN"),
-        get_ou("printerRDN"),
-        get_ou("componentRDN"),
-        get_ou("phoneRDN"));
+        get_ou("group", "ogroupRDN"),
+        get_ou("servgeneric", "serverRDN"),
+        get_ou("termgeneric", "terminalRDN"),
+        get_ou("workgeneric", "workstationRDN"),
+        get_ou("printgeneric", "printerRDN"),
+        get_ou("componentGeneric", "componentRDN"),
+        get_ou("phoneGeneric", "phoneRDN"));
 
     $tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'],
         array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
@@ -544,7 +544,7 @@ class workservice extends plugin
            */
           $p = $this->parent->by_object['ogroup'];
           foreach($p->memberList as $dn => $obj){
-            if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
+            if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$dn)) continue;
             if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
               $macs[] = $p->objcache[$dn]['macAddress'];
             }
@@ -554,7 +554,7 @@ class workservice extends plugin
           /* We are a workstation. Add current mac.
            */
           $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
-          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
+          if(!empty($mac) && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/",$this->orig_dn)){
             $macs[] = $mac;
           }          
         }
index d28a4b20149209c3da65e5e72d8f4dd056c12062..53ae8325af8f4b59f74b944c1773cc3380f23e95 100644 (file)
@@ -674,7 +674,7 @@ class workstartup extends plugin
       $ldap= $this->config->get_ldap_link();
 
       /* Strip relevant part from dn, keep trailing ',' */
-      $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
+      $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn);
       $tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
 
       /* Walk from top to base and try to load default values for
@@ -682,7 +682,7 @@ class workstartup extends plugin
       while (TRUE){
         $tmp= preg_replace ("/^[^,]+,/", "", $tmp);
 
-        $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp.
+        $ldap->cat("cn=default,".get_ou("termgeneric", "terminalRDN").$tmp.
             $this->config->current['BASE'], array('gotoTerminalPath'));
         $attrs= $ldap->fetch();
         if (isset($attrs['gotoTerminalPath'])){
index 6a7e0e02d4323b767aa355e05fa1793f68e543c2..95ae791d954ae5657e09c7c5a31602600fff4df9 100644 (file)
@@ -81,7 +81,7 @@ class printtabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['printgeneric'];
-    $this->dn= "cn=$baseobject->cn,".get_ou('printerRDN').$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou("printgeneric", "printerRDN").$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){
index b1adb932836e4177e9f932b1fe2ff037c623630b..444182e7e19a4733451e04c0e7dc5c1e143d2b99 100644 (file)
@@ -87,7 +87,7 @@ class termtabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['termgeneric'];
-    $this->dn= "cn=".$baseobject->cn.",".get_ou('terminalRDN').$baseobject->base;
+    $this->dn= "cn=".$baseobject->cn.",".get_ou("termgeneric", "terminalRDN").$baseobject->base;
     $baseobject->dn= $this->dn;
 
     if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
index 32bcaea5c2ba75c7d882c25452dfbd628153d5b7..83fbaf7ac5d9fec1170efd604d28af2fd0b44efd 100644 (file)
@@ -86,7 +86,7 @@ class worktabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['workgeneric'];
-    $this->dn= "cn=".$baseobject->cn.",".get_ou('workstationRDN').$baseobject->base;
+    $this->dn= "cn=".$baseobject->cn.",".get_ou("workgeneric", "workstationRDN").$baseobject->base;
 
     if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
 
index d62ad841ae82603c826cf1cc8033fe3fb1ed1737..c3bde1a0ccd8924027872c17f62038bac47b7dea 100644 (file)
@@ -264,7 +264,7 @@ class goShareServer extends goService{
 
    function process_mounts() {
 
-    $clip = "cn=" . $this->cn . ",".get_ou('serverRDN');
+    $clip = "cn=" . $this->cn . ",".get_ou("servgeneric", "serverRDN");
     $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
 
     $mounts = array(
index 8e50b5fc20228347344fdd49e6b972ba990cb847..b0b6b1156b1a8974cfd5eb9abe7199b04b7ea00a 100644 (file)
@@ -115,7 +115,7 @@ class servnfs extends plugin
         $smarty->assign("mount_checked", "checked");
       } else {
         $tmp = explode(",", $this->dn);
-        $clip = $tmp[0] . ",".get_ou('serverRDN');
+        $clip = $tmp[0] . ",".get_ou("servgeneric", "serverRDN");
         $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
         switch ($this->type) {
           case "netatalk" : {
index fa512efdabc949eb3642ea7a0f2aa3915bcbd978..5ee3d492e1ca8ff43603a37db9b17f99911f2011 100644 (file)
@@ -33,7 +33,7 @@ class hotplugSelect extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("deviceRDN"));
+    $this->storagePoints = array(get_ou("deviceGeneric", "deviceRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index bf42dec6c66bdf60618e39d8d8a48e5db8ae825c..78af46c89adfd04b6c925b3a16307761b1029bcd 100644 (file)
@@ -33,7 +33,7 @@ class printerSelect extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("printerRDN"));
+    $this->storagePoints = array(get_ou("printgeneric", "printerRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 90e835c925cddc6755459592b509f1f61076243c..14b734ac9d795915053af6bf49fa87052535a57a 100644 (file)
@@ -76,8 +76,8 @@ class xlsexport extends plugin
     $smarty->assign("deplist", $bases);
     $smarty->assign("choicelist",array( get_people_ou()             =>"users" ,
                                         get_groups_ou()             =>"groups" ,
-                                        get_ou('systemRDN')         =>"computers",
-                                        get_ou('serverRDN')          =>"servers",
+                                        get_ou("systemManagement", "systemRDN")         =>"computers",
+                                        get_ou("servgeneric", "serverRDN")          =>"servers",
                                         "dc=addressbook,"           =>"addressbook"));
 
     // Get the LDAP link, to generate the Export
index b4f19fbc41d6fee0a5ac7b50b6ec7d66556f2e7b..649d5200d0098e54f6b5e32c1f3763d25c8841ba 100644 (file)
@@ -152,7 +152,7 @@ function dump_ldap ($mode= 0)
      /* SYSTEMS 
         Get all systems from th $dn
         and put them into the xls work sheet */
-     case get_ou('systemRDN'): 
+     case get_ou("systemManagement", "systemRDN"): 
 
        $name_section=_("Servers");
        $computers= $ldap->gen_xls($dn,"(&(objectClass=*)(cn=*))",array("cn","description","uid"));
@@ -183,7 +183,7 @@ function dump_ldap ($mode= 0)
      /* SYSTEMS 
        Get all systems from th $dn
        and put them into the xls work sheet */
-     case get_ou('serverRDN'): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
+     case get_ou("servgeneric", "serverRDN"): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
        $intitul=array(_("Server name").":");
 
        //name of the xls file
@@ -288,7 +288,7 @@ function dump_ldap ($mode= 0)
     $computers= $ldap->gen_xls("ou=computers,".$dn,"(objectClass=*)",array("cn","description","uid"));
     $computers_intitul=array(_("Description").":",_("UID").":");
     //data about servers
-    $servers= $ldap->gen_xls(get_ou('serverRDN').$dn,"(objectClass=*)",array("cn"));
+    $servers= $ldap->gen_xls(get_ou("servgeneric", "serverRDN").$dn,"(objectClass=*)",array("cn"));
     $servers_intitul=array(_("Name").":");
     //data about addressbook
     $address= $ldap->gen_xls("dc=addressbook,".$dn,"(objectClass=*)",
index 89820d9e22fa08473f499bbc11272bcb4365f585..849276a49755336378354a6692119d7c16cc0a06 100644 (file)
@@ -33,7 +33,7 @@ class mailAddressSelect extends management
     $this->config = $config;
     $this->ui = $ui;
 
-    $this->storagePoints = array(get_ou("userRDN"), get_ou('groupRDN'));
+    $this->storagePoints = array(get_ou("core", "userRDN"), get_ou("core", "groupRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index b79e29d80d7c94316861e08958d3fba8ac663246..0dd5b04baad50b0e63d03de8fce793bcaf18b8cd 100644 (file)
@@ -95,7 +95,7 @@ class opsi extends gosaSupportDaemon
     foreach($res as $entry){
       if(!isset($entry['MAC'][0]['VALUE'])) $entry['MAC'][0]['VALUE'] = "";
       $obj = array(
-        "dn"          => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("sambaMachineAccountRDN").$this->config->current['BASE'],
+        "dn"          => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("wingeneric", "sambaMachineAccountRDN").$this->config->current['BASE'],
         "objectClass" => array("gosa_opsi_client"),
         "cn"          => array(0 => $entry['NAME'][0]['VALUE']),
         "macAddress"  => array(0 => $entry['MAC'][0]['VALUE']),
index d2f9487b768b9e38c9050de67da7d3db9968b375..0270f6ae913476ef0ded15aab02a55bbf43fc620 100644 (file)
@@ -73,7 +73,7 @@ class roleGeneric extends plugin {
       $ui = get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
     } else {
-      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleRDN"), '/i')."/","",$this->dn);
+      $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleGeneric", "roleRDN"), '/i')."/","",$this->dn);
     }
 
     // Keep track of naming attribute modifications
index 38d45e7aa413cfa502846df4d2e7d82fa1c32f80..968baf6f9505a16109c45b82d6a5322657df0c99 100644 (file)
@@ -38,7 +38,7 @@ class roleManagement extends management
     $this->config = $config;
     $this->ui = $ui;
    
-    $this->storagePoints = array(get_ou("roleRDN"));
+    $this->storagePoints = array(get_ou("roleGeneric", "roleRDN"));
  
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 5ab586cf633f2cfdf55a4a7ba3dabb35a428e3ef..98b3c00c38a6fa798b788d1df42a8cc75812d4dd 100644 (file)
@@ -55,7 +55,7 @@ class roletabs extends tabs
 
                /* Check for new 'dn', in order to propagate the
                   'dn' to all plugins */
-               $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleRDN").$baseobject->base;
+               $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleGeneric", "roleRDN").$baseobject->base;
 
                /* Move role? */
                if ($this->dn != $new_dn){
index 1ba789d10e3eb8693e0483aeee75290ba8fe302c..dd09288bbfa4b34d448ceceaed1f32685466d4b4 100644 (file)
@@ -60,8 +60,8 @@ class wingeneric extends plugin
       $ui = get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
       $this->cn= "";
-    } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+    } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn);
     } else {
       $this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou(), '/')."/i", "", $this->dn);
     }
@@ -192,7 +192,7 @@ class wingeneric extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
-    $this->dn= "cn=".$this->uid.",".get_ou('sambaMachineAccountRDN').$this->base;
+    $this->dn= "cn=".$this->uid.",".get_ou("wingeneric", "sambaMachineAccountRDN").$this->base;
 
     if(!$this->acl_is_createable()){
       $message[]= msgPool::permCreate();
index 209b14fca746c7e8de51080e52e72219c4f1c72e..869d7fe04b444b0cf68f49833dff5f508da34246 100644 (file)
@@ -51,7 +51,7 @@ class componentGeneric extends plugin
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
       $this->cn= "";
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentGeneric", "componentRDN"), '/')."/i", "", $this->dn);
     }
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
     /* Save dn for later references */
@@ -181,7 +181,7 @@ class componentGeneric extends plugin
     $message= plugin::check();
     $message= array_merge($message,$this->netConfigDNS->check());
 
-    $this->dn= "cn=".$this->cn.",".get_ou('componentRDN').$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou("componentGeneric", "componentRDN").$this->base;
 
     if ($this->cn == "" ){
       $message[]= msgPool::required(_("Component name"));
@@ -210,7 +210,7 @@ class componentGeneric extends plugin
           if(preg_match("/cn=dhcp,/",$attrs['dn'])){
             continue;
           }
-          if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"), '/')."/i",$attrs['dn'])){
+          if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentGeneric", "componentRDN"), '/')."/i",$attrs['dn'])){
             $message[]= msgPool::duplicated(_("Component name"));
             break;
           }
index d794cc807424ed315f00d06e2ea689428d6b2850..4c67c8bcda4c4d9cafe3dfa261fb8f2f46e8f033 100644 (file)
@@ -14,7 +14,7 @@ class filterSYSTEMS {
 
 
         foreach($entries as $key => $entry){
-            if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){
+            if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"),'/')."/i", $entry['dn'])){
 
                 // Detect incoming types
                 if(in_array('gotoWorkstation', $entry['objectClass'])){
index d8891da71c6f4c9143e83e24466de7270bfc34fe..10ef0acf69225c2eb0a936c2f0141184a60d3f6e 100644 (file)
@@ -84,10 +84,10 @@ class servgeneric extends plugin
       $ui= get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
       $this->cn= "";
-    } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+    } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn);
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i", "", $this->dn);
     }
     $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
     $this->netConfigDNS->set_acl_category("server");
@@ -312,7 +312,7 @@ class servgeneric extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
-    $this->dn= "cn=".$this->cn.",".get_ou('serverRDN').$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou("servgeneric", "serverRDN").$this->base;
 
     /* must: cn */
     if ($this->cn == ""){
@@ -336,7 +336,7 @@ class servgeneric extends plugin
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
           if ($attrs['dn'] != $this->orig_dn){
-            if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou('serverRDN'), '/')."/i",$attrs['dn'])){
+            if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN"), '/')."/i",$attrs['dn'])){
               $message[]= msgPool::duplicated(_("Server name"));
               break;
             }
@@ -346,7 +346,7 @@ class servgeneric extends plugin
     }
 
     /* Warn the user, that this host is currently installing */
-    if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
+    if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
 
       /* Force aborting without message dialog */
       $message[] = "";
index d6934e9e2507e86073ba72418f22c5d5560d00f7..066a767dd19b23cdefd954e54e2b4f335cf8f6df 100644 (file)
@@ -543,7 +543,7 @@ class systemManagement extends management
    */
   static function incomingFilterConverter($filter)
   {
-    $rdn = preg_replace("/^[^=]*=/", "", get_ou('systemIncomingRDN'));
+    $rdn = preg_replace("/^[^=]*=/", "", get_ou("ArpNewDevice", "systemIncomingRDN"));
     $rdn = preg_replace("/,.*$/","",$rdn);
     return(preg_replace("/%systemIncomingRDN/", $rdn,$filter));
   }
@@ -849,7 +849,7 @@ class systemManagement extends management
               $data['OG'], "<b>Selected ogroup:</b>");
 
           if($data['OG'] != "none"){
-            $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou('ogroupRDN'), '/')."/i", "", $data['OG']);
+            $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN"), '/')."/i", "", $data['OG']);
             $this->tabObject->by_object[$plugClass]->baseSelector->setBase($this->tabObject->base);
           } else {
             $this->tabObject->by_object[$plugClass]->baseSelector->setBase($headpage->getBase());
@@ -1269,7 +1269,7 @@ class systemManagement extends management
           "aclCategory" => "opsi"),
 
         "goServer" => array(
-          "ou"          => get_ou('serverRDN'),
+          "ou"          => get_ou("servgeneric", "serverRDN"),
           "plugClass"   => "servgeneric",
           "tabClass"    => "servtabs",
           "tabDesc"     => "SERVTABS",
@@ -1278,7 +1278,7 @@ class systemManagement extends management
           "aclCategory" => "server"),
 
         "gotoWorkstation" => array(
-          "ou"          => get_ou('workstationRDN'),
+          "ou"          => get_ou("workgeneric", "workstationRDN"),
           "plugClass"   => "workgeneric",
           "tabClass"    => "worktabs",
           "tabDesc"     => "WORKTABS",
@@ -1287,7 +1287,7 @@ class systemManagement extends management
           "aclCategory" => "workstation"),
 
         "gotoTerminal" => array(
-            "ou"          => get_ou('terminalRDN'),
+            "ou"          => get_ou("termgeneric", "terminalRDN"),
             "plugClass"   => "termgeneric",
             "tabClass"    => "termtabs",
             "sendEvents"  => TRUE,
@@ -1296,7 +1296,7 @@ class systemManagement extends management
             "aclCategory" => "terminal"),
 
         "gotoPrinter" => array(
-            "ou"          => get_ou('printerRDN'),
+            "ou"          => get_ou("printgeneric", "printerRDN"),
             "plugClass"   => "printgeneric",
             "tabClass"    => "printtabs",
             "tabDesc"     => "PRINTTABS",
@@ -1305,7 +1305,7 @@ class systemManagement extends management
             "aclCategory" => "printer"),
 
         "FAKE_OC_NewDevice" => array(
-            "ou"          => get_ou('systemIncomingRDN'),
+            "ou"          => get_ou("ArpNewDevice", "systemIncomingRDN"),
             "plugClass"   => "termgeneric",
             "tabClass"    => "termtabs",
             "sendEvents"  => TRUE,
@@ -1314,7 +1314,7 @@ class systemManagement extends management
             "aclCategory" => "terminal"),
 
         "goFonHardware" => array(
-            "ou"          => get_ou('phoneRDN'),
+            "ou"          => get_ou("phoneGeneric", "phoneRDN"),
             "plugClass"   => "phoneGeneric",
             "tabClass"    => "phonetabs",
             "tabDesc"     => "PHONETABS",
@@ -1332,7 +1332,7 @@ class systemManagement extends management
             "aclCategory" => "winworkstation"),
 
         "ieee802Device" => array(
-            "ou"          => get_ou('componentRDN'),
+            "ou"          => get_ou("componentGeneric", "componentRDN"),
             "plugClass"   => "componentGeneric",
             "sendEvents"  => FALSE,
             "tabClass"    => "componenttabs",
index dc37a189764298d1204f79dda65bfe547c31b61e..ccfe124651fb1a60f2387f1d14ad920fb0ebd934 100644 (file)
@@ -189,13 +189,13 @@ class termDNS extends plugin
        over the whole ldap server was 10 to 20 times slower.
      */
     $deps  = array();
-    $ou = preg_replace("/,.*$/","",get_ou("systemRDN"));
-    $a_ous = array(get_ou("serverRDN"),
-                  get_ou("terminalRDN"),
-                  get_ou("workstationRDN"),
-                  get_ou("printerRDN"),
-                  get_ou("phoneRDN"),
-                  get_ou("componentRDN"));
+    $ou = preg_replace("/,.*$/","",get_ou("systemManagement", "systemRDN"));
+    $a_ous = array(get_ou("servgeneric", "serverRDN"),
+                  get_ou("termgeneric", "terminalRDN"),
+                  get_ou("workgeneric", "workstationRDN"),
+                  get_ou("printgeneric", "printerRDN"),
+                  get_ou("phoneGeneric", "phoneRDN"),
+                  get_ou("componentGeneric", "componentRDN"));
   
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
index c46ce62863705d28a5d6484e6b0035d02fbd1d8f..875a555123057a1f0849e39bd3dabbb6fb89eca2 100644 (file)
@@ -32,7 +32,7 @@ class systemSelect extends management
   {
     $this->config = $config;
     $this->ui = $ui;
-    $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('terminalRDN'));
+    $this->storagePoints = array(get_ou("servgeneric", "serverRDN"), get_ou("workgeneric", "workstationRDN"), get_ou("termgeneric", "terminalRDN"));
 
     // Build filter
     if (session::global_is_set(get_class($this)."_filter")){
index 5dfc787ccf7b029404c4fe6163534fee7559b9b5..ac1a6ab5eab91af846dc39988f374a8848dede8e 100644 (file)
@@ -45,7 +45,7 @@ class componenttabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['componentGeneric'];
-    $this->dn= "cn=$baseobject->cn,".get_ou('componentRDN').$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou("componentGeneric", "componentRDN").$baseobject->base;
 
     if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
 
index ea977581a05597e6bf26fc7f8819b7873ffab1d4..1acab8a03081398374fa1912b1c7759bd599a0c2 100644 (file)
@@ -101,7 +101,7 @@ class servtabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['servgeneric'];
-    $this->dn= "cn=$baseobject->cn,".get_ou('serverRDN').$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou("servgeneric", "serverRDN").$baseobject->base;
 
     /* cn is not case sensitive for ldap, but for php it is!! */
     if($baseobject->orig_dn != "new"){