From: hickert Date: Wed, 2 Jan 2008 14:54:12 +0000 (+0000) Subject: Replaced ou=devices/ou=macro/ou=conferences with get_ou X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=48b67383c93ac1576dc347447db9d9d647012c32;p=gosa.git Replaced ou=devices/ou=macro/ou=conferences with get_ou git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8182 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 7201467cc..03fd08287 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1041,6 +1041,9 @@ function get_ou($name) "printerou" => "ou=printers,ou=systems,", "phoneou" => "ou=phones,ou=systems,", "componentou" => "ou=netdevices,ou=systems,", + "macroou" => "ou=macros,ou=asterisk,ou=configs,ou=systems,", + "conferenceou" => "ou=conferences,ou=asterisk,ou=configs,ou=systems,", + "deviceou" => "ou=devices,", "mimetypeou" => "ou=mime,"); /* Preset ou... */ diff --git a/gosa-core/plugins/admin/devices/class_deviceGeneric.inc b/gosa-core/plugins/admin/devices/class_deviceGeneric.inc index 095adf7f3..a7e6df15c 100644 --- a/gosa-core/plugins/admin/devices/class_deviceGeneric.inc +++ b/gosa-core/plugins/admin/devices/class_deviceGeneric.inc @@ -44,7 +44,7 @@ class deviceGeneric extends plugin $this->base= dn2base($ui->dn); } } else { - $this->base =preg_replace ("/^[^,]+,ou=devices,/","",$this->dn); + $this->base =preg_replace ("/^[^,]+,".get_ou('deviceou')."/","",$this->dn); } } diff --git a/gosa-core/plugins/admin/devices/class_deviceManagement.inc b/gosa-core/plugins/admin/devices/class_deviceManagement.inc index 61ea93afa..2558cc135 100644 --- a/gosa-core/plugins/admin/devices/class_deviceManagement.inc +++ b/gosa-core/plugins/admin/devices/class_deviceManagement.inc @@ -425,7 +425,7 @@ class deviceManagement extends plugin /* Return departments, that will be included within snapshot detection */ function get_used_snapshot_bases() { - return(array("ou=devices,".$this->DivListDevices->selectedBase)); + return(array(get_ou('deviceou').$this->DivListDevices->selectedBase)); } function copyPasteHandling_from_queue($s_action,$s_entry) @@ -507,11 +507,11 @@ class deviceManagement extends plugin if($SubSearch){ $Flags |= GL_SUBSEARCH; }else{ - $base ="ou=devices,".$base; + $base = get_ou('deviceou').$base; } /* Get results and create index */ - $res= get_sub_list($Filter,"devices","ou=devices", $base, array("cn","description","dn","objectClass"), $Flags); + $res= get_sub_list($Filter,"devices",get_ou('deviceou'), $base, array("cn","description","dn","objectClass"), $Flags); $tmp2 = array(); foreach ($res as $val){ $tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn']; diff --git a/gosa-core/plugins/admin/devices/class_divListDevices.inc b/gosa-core/plugins/admin/devices/class_divListDevices.inc index fb09fe8c8..e9d5f8522 100755 --- a/gosa-core/plugins/admin/devices/class_divListDevices.inc +++ b/gosa-core/plugins/admin/devices/class_divListDevices.inc @@ -120,7 +120,7 @@ class divListDevices extends MultiSelectWindow /* Get acls */ $ui = get_userinfo(); - $acl = $ui->get_permissions("cn=dummy,ou=devices,".$this->selectedBase,"devices/deviceGeneric"); + $acl = $ui->get_permissions("cn=dummy,".get_ou('deviceou').$this->selectedBase,"devices/deviceGeneric"); $acl_all = $ui->has_complete_category_acls($this->selectedBase,"devices") ; diff --git a/gosa-core/plugins/admin/devices/tabs_devices.inc b/gosa-core/plugins/admin/devices/tabs_devices.inc index 9cb2e9017..97316ddd2 100755 --- a/gosa-core/plugins/admin/devices/tabs_devices.inc +++ b/gosa-core/plugins/admin/devices/tabs_devices.inc @@ -15,7 +15,7 @@ class devicetabs extends tabs function save($ignore_account= FALSE) { $baseobject= $this->by_object['deviceGeneric']; - $new_dn= "cn=".$baseobject->cn.",ou=devices,".$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('deviceou').$baseobject->base; /* Move group? */ if ($this->dn != $new_dn){ diff --git a/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc b/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc index 023e52e36..eabc6e2ae 100644 --- a/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -312,7 +312,7 @@ class phoneConferenceManagment extends plugin /* Insert new entry*/ if($s_action == "new" ){ - $dummy_dn = "cn=dummy,ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase; + $dummy_dn = "cn=dummy,".get_ou('conferenceou').$this->DivListConference->selectedBase; $acl = $this->ui->get_permissions($dummy_dn,"gofonconference/conference"); if(preg_match("/c/",$acl)){ /* Set up the users ACL's for this 'dn' */ @@ -410,7 +410,7 @@ class phoneConferenceManagment extends plugin /* Return departments, that will be included within snapshot detection */ function get_used_snapshot_bases() { - return(array("ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase)); + return(array(get_ou('conferenceou').$this->DivListConference->selectedBase)); } @@ -419,7 +419,7 @@ class phoneConferenceManagment extends plugin */ function reload() { - $Base = "ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase; + $Base = get_ou('conferenceou').$this->DivListConference->selectedBase; $SubSearch = $this->DivListConference->SubSearch; $Regex = $this->DivListConference->Regex; $Flags = GL_SIZELIMIT ; diff --git a/gosa-core/plugins/gofon/macro/class_gofonMacroManagement.inc b/gosa-core/plugins/gofon/macro/class_gofonMacroManagement.inc index f25f49521..764a445bb 100755 --- a/gosa-core/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-core/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -490,7 +490,7 @@ class goFonMacro extends plugin /* Return departments, that will be included within snapshot detection */ function get_used_snapshot_bases() { - return(array("ou=macros,ou=asterisk,ou=configs,ou=systems,".$this->DivListMacro->selectedBase)); + return(array(get_ou('macroou').$this->DivListMacro->selectedBase)); } @@ -508,7 +508,7 @@ class goFonMacro extends plugin if($SubSearch){ $Flags |= GL_SUBSEARCH; }else{ - $base = "ou=macros,ou=asterisk,ou=configs,ou=systems,".$base; + $base = get_ou('macroou').$base; } /* Generate macro list */ diff --git a/gosa-core/plugins/gofon/macro/tabs_macros.inc b/gosa-core/plugins/gofon/macro/tabs_macros.inc index 5c5bcf6c9..b2003f86e 100755 --- a/gosa-core/plugins/gofon/macro/tabs_macros.inc +++ b/gosa-core/plugins/gofon/macro/tabs_macros.inc @@ -17,7 +17,7 @@ class macrotabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - $new_dn= "cn=".$baseobject->cn.",ou=macros,ou=asterisk,ou=configs,ou=systems,".$baseobject->base; + $new_dn= "cn=".$baseobject->cn.",".get_ou('macroou').$baseobject->base; /* Move group? */ if ($this->dn != $new_dn){ diff --git a/gosa-core/plugins/personal/environment/class_hotplugDialog.inc b/gosa-core/plugins/personal/environment/class_hotplugDialog.inc index 0dd418e13..2e772481d 100644 --- a/gosa-core/plugins/personal/environment/class_hotplugDialog.inc +++ b/gosa-core/plugins/personal/environment/class_hotplugDialog.inc @@ -75,7 +75,7 @@ class hotplugDialog extends plugin function getHotplugs() { $ldap= $this->config->get_ldap_link(); - $ldap->cd("ou=devices,".$this->depselect); + $ldap->cd(get_ou('deviceou').$this->depselect); $ldap->search("(&(objectClass=gotoDevice)(|(cn=".$this->regex.")(description=".$this->regex.")))",array("gotoHotplugDevice","cn","dn")); $a_return = array();