From: hickert Date: Mon, 10 May 2010 13:33:04 +0000 (+0000) Subject: Updated get_ou it receives values from the config registry now. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5e43a8d77d3a4e52c3c9604fee257cd1fdfe9c40;p=gosa.git Updated get_ou it receives values from the config registry now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18272 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 97af88167..afcfb8887 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -102,7 +102,7 @@ class ogroup extends plugin $ui = get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); } else { - $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/i","",$this->dn); + $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN") , '/')."/i","",$this->dn); } /* Detect all workstations, which are already assigned to an object group @@ -432,24 +432,24 @@ class ogroup extends plugin "departments" => array("OBJ"=>"department", "CLASS"=>"gosaDepartment" , "DN"=> "" ,"ACL" => "department"), "servers" => array("OBJ"=>"servgeneric", "CLASS"=>"goServer" , - "DN"=> get_ou('serverRDN') ,"ACL" => "server"), + "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "server"), "workstations" => array("OBJ"=>"workgeneric", "CLASS"=>"gotoWorkstation", - "DN"=> get_ou('workstationRDN') ,"ACL" => "workstation"), + "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "workstation"), "winstations" => array("OBJ"=>"wingeneric", "CLASS"=>"opsiClient", - "DN"=> get_ou('SAMBAMACHINEACCOUNTRDN') ,"ACL" => "winstation"), + "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "winstation"), "terminals" => array("OBJ"=>"termgeneric", "CLASS"=>"gotoTerminal" , - "DN"=> get_ou('terminalRDN') ,"ACL" => "terminal"), + "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "terminal"), "printers" => array("OBJ"=>"printgeneric", "CLASS"=>"gotoPrinter" , - "DN"=> get_ou('printerRDN') ,"ACL" => "printer"), + "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "printer"), "phones" => array("OBJ"=>"phoneGeneric", "CLASS"=>"goFonHardware" , - "DN"=> get_ou('phoneRDN') ,"ACL" => "phone")); + "DN"=> get_ou("group", "ogroupRDN") ,"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("group", "ogroupRDN") ,"ACL" => "application"); } /*########### @@ -625,7 +625,7 @@ class ogroup extends plugin /* Permissions for that base? */ if ($this->base != ""){ - $new_dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base; + $new_dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN") .$this->base; } else { $new_dn= $this->dn; } @@ -703,7 +703,7 @@ class ogroup extends plugin /* New accounts need proper 'dn', propagate it to remaining objects */ if ($this->dn == 'new'){ - $this->dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base; + $this->dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN") .$this->base; } /* Save data. Using 'modify' implies that the entry is already present, use 'add' for diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 54be3f263..460cbe43a 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -38,7 +38,7 @@ class ogroupManagement extends management $this->config = $config; $this->ui = $ui; - $this->storagePoints = array(get_ou("ogroupRDN")); + $this->storagePoints = array(get_ou("group", "ogroupRDN") ); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc index f406bd7f9..8a22728dd 100644 --- a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc +++ b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc @@ -33,13 +33,13 @@ class objectSelect extends management $this->config = $config; $this->ui = $ui; $this->storagePoints = array( - get_ou("userRDN"), - get_ou("groupRDN"), - get_ou("terminalRDN"), - get_ou("workstationRDN"), - get_ou("serverRDN"), - get_ou("printerRDN"), - get_ou("phoneRDN")); + get_ou("core", "userRDN") , + get_ou("core", "userRDN") , + get_ou("core", "userRDN") , + get_ou("core", "userRDN") , + get_ou("core", "userRDN") , + get_ou("core", "userRDN") , + get_ou("core", "userRDN") ); // Build filter if (session::global_is_set(get_class($this)."_filter")){ diff --git a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc index f7846ba37..f45a36b14 100644 --- a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc +++ b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc @@ -344,7 +344,7 @@ class ogrouptabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN") .$baseobject->base; /* Move group? */ if (LDAP::fix($this->dn) != LDAP::fix($new_dn)){ @@ -360,7 +360,7 @@ class ogrouptabs extends tabs } if ($this->dn == "new"){ - $this->dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base; + $this->dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN") .$baseobject->base; } /* Only delete attributes if there are members left */