summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb8d718)
raw | patch | inline | side by side (parent: bb8d718)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Jan 2008 07:40:07 +0000 (07:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Jan 2008 07:40:07 +0000 (07:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8187 594d385d-05f5-0310-b6e9-bd551577e9d8
31 files changed:
index 5c2f13a072c54ec1ba3783f10a9c6258c9a26cd2..a9427a3ca8c7c39bd9bf94287e70d2412820f507 100644 (file)
/* PEOPLE
Get all peoples from this $dn
and put them into the xls work sheet */
- case "ou=people," :
+ case get_people_ou() :
$user = $ldap->gen_xls($dn,"(objectClass=*)",array("uid","dateOfBirth","gender","givenName","preferredLanguage"));
$intitul = array(_("Birthday").":", _("Sex").":", _("Surname")."/"._("Given name").":",_("Language").":");
/* GROUPS
Get all groups from th $dn
and put them into the xls work sheet */
- case "ou=groups,":
+ case get_groups_ou():
/* Get group data */
$groups = $ldap->gen_xls($dn,"(objectClass=*)",array("cn","memberUid"),TRUE,1);
/* SYSTEMS
Get all systems from th $dn
and put them into the xls work sheet */
- case "ou=systems,":
+ case get_ou('systemsou'):
$name_section=_("Servers");
$computers= $ldap->gen_xls($dn,"(&(objectClass=*)(cn=*))",array("cn","description","uid"));
$dn = base64_decode($_GET['dn']);
//data about users
- $user= $ldap->gen_xls("ou=people,".$dn,"(objectClass=*)",array("uid","dateOfBirth","gender","givenName","preferredLanguage"));
+ $user= $ldap->gen_xls( get_people_ou().$dn,"(objectClass=*)",array("uid","dateOfBirth","gender","givenName","preferredLanguage"));
$user_intitul=array(_("Day of birth").":",_("Sex").":",_("Surname")."/"._("Given name").":",_("Language").":");
//data about groups
- $groups= $ldap->gen_xls("ou=groups,".$dn,"(objectClass=*)",array("cn","memberUid"),TRUE,1);
+ $groups= $ldap->gen_xls(get_groups_ou().$dn,"(objectClass=*)",array("cn","memberUid"),TRUE,1);
$groups_intitul=array(_("Members").":");
//data about computers
$computers= $ldap->gen_xls("ou=computers,".$dn,"(objectClass=*)",array("cn","description","uid"));
index 131c4a282d9ac9955d7855515c86a6ab2020ff5f..77ccf4d134300976211759b3f7378fecfeb3ca3a 100644 (file)
global $config;
$map = array( "applicationou" => "ou=apps,",
+ "systemsou" => "ou=systems,",
"serverou" => "ou=servers,ou=systems,",
"terminalou" => "ou=terminals,ou=systems,",
"workstationou" => "ou=workstations,ou=systems,",
"printerou" => "ou=printers,ou=systems,",
"phoneou" => "ou=phones,ou=systems,",
"componentou" => "ou=netdevices,ou=systems,",
+ "blocklistou" => "ou=gofax,ou=systems,",
+ "incomingou" => "ou=incoming,",
+ "aclroleou" => "ou=aclroles,",
"macroou" => "ou=macros,ou=asterisk,ou=configs,ou=systems,",
"conferenceou" => "ou=conferences,ou=asterisk,ou=configs,ou=systems,",
+
+ "faiou" => "ou=fai,ou=configs,ou=systems,",
+ "faiscriptou" => "ou=scripts,",
+ "faihookou" => "ou=hooks,",
+ "faitemplateou" => "ou=templates,",
+ "faivariableou" => "ou=variables,",
+ "faiprofileou" => "ou=profiles,",
+ "faipackageou" => "ou=packages,",
+ "faipartitionou"=> "ou=disk,",
+
"deviceou" => "ou=devices,",
"mimetypeou" => "ou=mime,");
$ou = $map[$name];
return($ou);
} else {
+ trigger_error("No department mapping found for type ".$name);
return "";
}
index 26c0a572659f10287d156965b74bdb68579e2095..d01cfbc7e36a1302620bf4b962aac0f1a5af63a6 100644 (file)
{
global $config;
- if(!preg_match("/ou=fai,ou=configs,ou=systems,/",$dn)){
- $base = "ou=fai,ou=configs,ou=systems,".$dn;
+ if(!preg_match("/".normalizePreg(get_ou('faiou'))."/",$dn)){
+ $base = get_ou('faiou').$dn;
}else{
$base = $dn;
}
$ldap->search("(objectClass=FAIbranch)",array("ou","dn"));
while($attrs = $ldap->fetch()){
if($appendedName){
- $res[$attrs['dn']] = convert_department_dn(preg_replace("/,ou=fai,ou=configs,ou=system.*$/","",$attrs['dn']));
+ $res[$attrs['dn']] = convert_department_dn(preg_replace("/,".normalizePreg(get_ou('faiou')).".*$/","",$attrs['dn']));
}else{
$res[$attrs['dn']] = $attrs['ou'][0];
}
diff --git a/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc b/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc
index 2f392faeafddeb310ab96a9aad1aded3657d40a1..90bab709acfa37ee7fea5f7c859ccb4359628b61 100644 (file)
}
$smarty->assign("deplist", $bases);
$smarty->assign("choicelist",array( get_people_ou() =>"users" ,
- "ou=groups," =>"groups" ,
- "ou=systems," =>"computers",
+ get_groups_ou() =>"groups" ,
+ get_ou('systemsou') =>"computers",
get_ou('serverou') =>"servers",
"dc=addressbook," =>"addressbook"));
diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc
index d8854020652cd24dc937ac84e36886814b575afd..7a1b2ab2b2895bab6bd00b6f4aa156b161e0dc13 100644 (file)
/* Fetch following structures, this will be used if !$SubSearch */
$fetch_this = array(
"ME" => array("TYPE" => "cat" , "FLAGS" => GL_SIZELIMIT ,"BASE"=>""),
- "SYSTEMS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>"ou=systems,"),
+ "SYSTEMS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_ou('systemsou')),
"APPS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_ou('applicationou')),
"PEOPLE" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_people_ou()),
"GROUPS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_groups_ou()));
}else{
- $tmp_roles = get_list($FilterRoles, "acl", "ou=aclroles,".$base, $Attrs,GL_SIZELIMIT);
+ $tmp_roles = get_list($FilterRoles, "acl", get_ou('aclroleou').$base, $Attrs,GL_SIZELIMIT);
foreach($tmp_roles as $entry){
$res[] = $entry;
diff --git a/gosa-core/plugins/admin/acl/tabs_acl_role.inc b/gosa-core/plugins/admin/acl/tabs_acl_role.inc
index b1132357d14828b93a7d2bb638e3e95c3b9adc14..3c119d164098a09553f128d1143a1f099d995dcd 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.",ou=aclroles,".$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('aclroleou').$baseobject->base;
if ($this->dn != $new_dn){
diff --git a/gosa-core/plugins/admin/fai/class_askClassName.inc b/gosa-core/plugins/admin/fai/class_askClassName.inc
index 4225869cc0acbbeee5bc6eda79fdc51f9acac948..54ec897fbd380a9268459ae5f32bde566815f843 100644 (file)
* With a second search detect all object that belong to the different ous.
*/
- $base = "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $base = get_ou('faiou').$_SESSION['CurrentMainBase'];
if($faifilter['branch'] != "main"){
$base = $faifilter['branch'];
}
diff --git a/gosa-core/plugins/admin/fai/class_faiManagement.inc b/gosa-core/plugins/admin/fai/class_faiManagement.inc
index 13873f9540d258e6853317b8564a2cc5b2cf4a5c..3fea1c5c070886b2476cf195d0e005cbdf8fd1a0 100644 (file)
$name = $br[$bb];
$ldap->cd($bb);
$ldap->recursive_remove();
- $ldap->cd(preg_replace('/,ou=fai,ou=configs,ou=systems,/', ','.get_ou('applicationou'), $bb));
+ $ldap->cd(preg_replace('/,'.get_ou('faiou').'/', ','.get_ou('applicationou'), $bb));
$ldap->recursive_remove();
$this->DivListFai->selectedBranch = "main";
$name = $_POST['BranchName'];
$is_ok = true;
$smarty->assign("BranchName",$name);
- $base= "ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase;
+ $base= get_ou('faiou').$this->DivListFai->selectedBase;
/* Check used characters */
if(preg_match("/[^0-9a-z \ö\ä\ü\.-_:,]/i",$name)){
}
}
- $appsrc = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),$baseToUse);
- $appdst = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),"ou=".$name.",".$baseToUse) ;
+ $appsrc = preg_replace("/".normalizePreg(get_ou('faiou'))."/",get_ou('applicationou'),$baseToUse);
+ $appdst = preg_replace("/".normalizePreg(get_ou('faiou'))."/",get_ou('applicationou'),"ou=".$name.",".$baseToUse) ;
- $mimesrc = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('mimetypeou'),$baseToUse);
- $mimedst = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('mimetypeou'),"ou=".$name.",".$baseToUse) ;
+ $mimesrc = preg_replace("/".normalizePreg(get_ou('faiou'))."/",get_ou('mimetypeou'),$baseToUse);
+ $mimedst = preg_replace("/".normalizePreg(get_ou('faiou'))."/",get_ou('mimetypeou'),"ou=".$name.",".$baseToUse) ;
/* Check if source depeartments exist */
foreach(array($baseToUse,$appsrc,$mimesrc) as $dep){
function get_used_snapshot_bases()
{
$tmp = array();
- $types = array("hooks","scripts","disk","packages","profiles","templates","variables");
+ $types = array("faipartitionou","faiscriptou","faitemplateou","faihookou","faiprofileou","faivariableou","faipackageou");
foreach($types as $type){
if($this->DivListFai->selectedBranch == "main"){
- $tmp[] = "ou=".$type.",ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase;
+ $tmp[] = get_ou($type).get_ou('faiou').$this->DivListFai->selectedBase;
}else{
- $tmp[] = "ou=".$type.",".$this->DivListFai->selectedBranch;
+ $tmp[] = get_ou($type).$this->DivListFai->selectedBranch;
}
}
return($tmp);
$this->objects = array();
/* Get base */
- $base = "ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase;
+ $base = get_ou('faiou').$this->DivListFai->selectedBase;
if($this->DivListFai->selectedBranch != "main"){
$br = $this->getBranches();
if(isset($br[$this->DivListFai->selectedBranch])){
$base = $this->DivListFai->selectedBranch;
}else{
- $base = "ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase;
+ $base = get_ou('faiou').$this->DivListFai->selectedBase;
}
}
$this->base = $base;
* Generate List of Partitions,Hooks,Scripts,Templates,Profiles ...
*/
$ObjectTypes = array(
- "FAIpartitionTable" => array("OU"=>"ou=disk," , "CHKBOX"=>"ShowPartitions" ,"ACL" => "faiPartitionTable"),
- "FAIpackageList" => array("OU"=>"ou=packages," , "CHKBOX"=>"ShowPackages" ,"ACL" => "faiPackage"),
- "FAIscript" => array("OU"=>"ou=scripts," , "CHKBOX"=>"ShowScripts" ,"ACL" => "faiScript"),
- "FAIvariable" => array("OU"=>"ou=variables," , "CHKBOX"=>"ShowVariables" ,"ACL" => "faiVariable"),
- "FAIhook" => array("OU"=>"ou=hooks," , "CHKBOX"=>"ShowHooks" ,"ACL" => "faiHook"),
- "FAIprofile" => array("OU"=>"ou=profiles," , "CHKBOX"=>"ShowProfiles" ,"ACL" => "faiProfile"),
- "FAItemplate" => array("OU"=>"ou=templates," , "CHKBOX"=>"ShowTemplates" ,"ACL" => "faiTemplate"));
+ "FAIpartitionTable" => array("OU"=> get_ou('faipartitionou') , "CHKBOX"=>"ShowPartitions" ,"ACL" => "faiPartitionTable"),
+ "FAIpackageList" => array("OU"=> get_ou('faipackageou') , "CHKBOX"=>"ShowPackages" ,"ACL" => "faiPackage"),
+ "FAIscript" => array("OU"=> get_ou('faiscriptou') , "CHKBOX"=>"ShowScripts" ,"ACL" => "faiScript"),
+ "FAIvariable" => array("OU"=> get_ou('faivariableou') , "CHKBOX"=>"ShowVariables" ,"ACL" => "faiVariable"),
+ "FAIhook" => array("OU"=> get_ou('faihookou') , "CHKBOX"=>"ShowHooks" ,"ACL" => "faiHook"),
+ "FAIprofile" => array("OU"=> get_ou('faiprofileou') , "CHKBOX"=>"ShowProfiles" ,"ACL" => "faiProfile"),
+ "FAItemplate" => array("OU"=> get_ou('faitemplateou') , "CHKBOX"=>"ShowTemplates" ,"ACL" => "faiTemplate"));
$filter = "";
foreach($ObjectTypes as $key => $data){
diff --git a/gosa-core/plugins/admin/fai/class_faiPackage.inc b/gosa-core/plugins/admin/fai/class_faiPackage.inc
index bcd5eaaf69bb268efd336b177c41bfe7f44a8481..c3a3fe971010101226f2978a335534c882ce3009 100644 (file)
if(!$this->is_account){
/* Assemble release name */
- $tmp= preg_replace('/,ou=fai,ou=configs,ou=systems,.*$/', '', $_SESSION['faifilter']['branch']);
+ $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $_SESSION['faifilter']['branch']);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(split(',', $tmp));
$this->FAIdebianRelease= "";
/* Assemble release name */
if($this->FAIdebianRelease == "ClearFromCopyPaste"){
- $tmp= preg_replace('/,ou=fai,ou=configs,ou=systems,.*$/', '', $_SESSION['faifilter']['branch']);
+ $tmp= preg_replace('/,'.normalizePreg(get_ou('faiou')).'.*$/', '', $_SESSION['faifilter']['branch']);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(split(',', $tmp));
$this->FAIdebianRelease= "";
diff --git a/gosa-core/plugins/admin/fai/class_faiProfile.inc b/gosa-core/plugins/admin/fai/class_faiProfile.inc
index 4b5daea9b228ad9d07bf7027cb20334c20e26d67..6c1fea191132cfbb0ac637c109a0531d82e92756 100644 (file)
if($base == "main"){
$base =$_SESSION['CurrentMainBase'];
}
- $base = "ou=profiles,".$base;
+ $base = get_ou('faiprofileou').$base;
$ldap->cd($base);
if ($this->old_cn == ""){
diff --git a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc
index 2d9b0976458f0bd8f23fd7232de5b0eb2bdc0af2..1dbcad7f0bbde6974fa4fd8a76eaac7b6cad66d2 100644 (file)
plugin::plugin ($config, $dn);
/* Search only in fai tree */
- $base = "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $base = get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
$base = $_SESSION['faifilter']['branch'];
}
/* If no search filter is set, create one */
if (!is_global("SUBfaifilter")){
- $SUBfaifilter= array("base" => "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'], "Sregex" => "*");
+ $SUBfaifilter= array("base" => get_ou('faiou').$_SESSION['CurrentMainBase'], "Sregex" => "*");
$SUBfaifilter['SShowTemplates'] = true;
$SUBfaifilter['SShowScripts'] = true;
$SUBfaifilter['SShowHooks'] = true;
diff --git a/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc b/gosa-core/plugins/admin/fai/class_faiSummaryTab.inc
index a9bfbb840a39c40b631d85913d6d2c4b7650eb82..1fde58e56bcd3cabc83a804576187b2982b87c8f 100644 (file)
/* Base object configuration */
$this->objs = array(
- "FAIscript" => array( "Image" =>"images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>"ou=scripts,") ,
- "FAIhook" => array( "Image" =>"images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>"ou=hooks,"),
- "FAIvariable" => array( "Image" =>"images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>"ou=variables,") ,
- "FAItemplate" => array( "Image" =>"images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>"ou=templates,") ,
- "FAIpartitionTable" => array( "Image" =>"images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>"ou=disk,") ,
- "FAIpackageList" => array( "Image" =>"images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>"ou=packages,") ,
- "FAIprofile" => array( "Image" =>"images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>"ou=profiles,"));
+ "FAIscript" => array( "Image" =>"images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>get_ou('faiscriptou')) ,
+ "FAIhook" => array( "Image" =>"images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou('faihookou')),
+ "FAIvariable" => array( "Image" =>"images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou('faivariableou')) ,
+ "FAItemplate" => array( "Image" =>"images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>get_ou('faitemplateou')) ,
+ "FAIpartitionTable" => array( "Image" =>"images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>get_ou('faipartitionou')) ,
+ "FAIpackageList" => array( "Image" =>"images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou('faipackageou')) ,
+ "FAIprofile" => array( "Image" =>"images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou('faiprofileou')));
}
/* Get Classes and release */
$this->Classes = $this->parent->by_object['faiProfile']->FAIclasses;
$this->base = $this->parent->by_object['faiProfile']->base;
- $str = preg_replace("/^.*ou=profiles,/","",$this->dn);
+ $str = preg_replace("/^.*".normalizePreg(get_ou('faiprofileou'))."/","",$this->dn);
/* Check if parent tab is work tab */
}elseif(isset($this->parent->by_name['workstartup'])){
index 1857854b33906d62e096d33a878e79f6dbb44ff1..d431eea1e530a8a7e2a04f9c33c0173846355711 100644 (file)
{
$baseobject= $this->by_object['faiHook'];
- $new_dn= 'cn='.$baseobject->cn.",ou=hooks,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faihookou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=hooks,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faihookou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsPackage.inc b/gosa-core/plugins/admin/fai/tabsPackage.inc
index 8731835ef2bbbd990c58977372348b1f2185e2b1..6a3d58158037a8d7b20b12584f0741274e0338c4 100644 (file)
{
$baseobject= $this->by_object['faiPackage'];
- $new_dn= 'cn='.$baseobject->cn.",ou=packages,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipackageou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=packages,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faipackageou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsPartition.inc b/gosa-core/plugins/admin/fai/tabsPartition.inc
index 9d2312d5707521326e214c427bb3cca142827295..56bd1d2f4fc23ca6f81bf7f4068648e0c34d8f8c 100644 (file)
{
$baseobject= $this->by_object['faiPartitionTable'];
- $new_dn= 'cn='.$baseobject->cn.",ou=disk,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipartitionou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=disk,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faipartitionou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsProfile.inc b/gosa-core/plugins/admin/fai/tabsProfile.inc
index cbc3abd940b752583b3bd0091a090bc594a8d1ca..3480b46aff5b5bddaf2c33c6857e9fa00bfcd7be 100644 (file)
{
$baseobject= $this->by_object['faiProfile'];
- $new_dn= 'cn='.$baseobject->cn.",ou=profiles,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiprofileou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=profiles,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiprofileou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsScript.inc b/gosa-core/plugins/admin/fai/tabsScript.inc
index 28ebd224a609cfb0e617ff35173d0dc9e2aed70c..1eac83c38c1c18cc18f62642e2183aceb03af75f 100644 (file)
{
$baseobject= $this->by_object['faiScript'];
- $new_dn= 'cn='.$baseobject->cn.",ou=scripts,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faiscriptou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=scripts,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiscriptou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsTemplate.inc b/gosa-core/plugins/admin/fai/tabsTemplate.inc
index 2ff58199b1f2fca2f9c01e685fa7054733cfa786..eb674e894825a8492b76d4fee71aa1e341a9d7ba 100644 (file)
{
$baseobject= $this->by_object['faiTemplate'];
- $new_dn= 'cn='.$baseobject->cn.",ou=templates,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faitemplateou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=templates,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faitemplateou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/fai/tabsVariable.inc b/gosa-core/plugins/admin/fai/tabsVariable.inc
index c872f2d9bca24762ea4b4a5683adb899ab54135a..2958a11f5073d218a714aeac6908635eabb60bc2 100644 (file)
{
$baseobject= $this->by_object['faiVariable'];
- $new_dn= 'cn='.$baseobject->cn.",ou=variables,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('faivariableou').get_ou('faiou').$_SESSION['CurrentMainBase'];
if($_SESSION['faifilter']['branch']!="main"){
- $new_dn ='cn='.$baseobject->cn.",ou=variables,".$_SESSION['faifilter']['branch'];
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faivariableou').$_SESSION['faifilter']['branch'];
}
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 095d3be2792d98f9657cc055b7fbf52dbed301b7..133cf5650db49b1392fe1df25e1cda53780e08b2 100644 (file)
/* Check for used 'cn' */
$ldap= $this->config->get_ldap_link();
if(($this->cn != $this->orig_cn) || ($this->orig_dn == "new")){
- $ldap->cd("ou=groups,".$this->base);
+ $ldap->cd(get_groups_ou().$this->base);
$ldap->ls("(&(|(objectClass=gosaGroupOfNames)(objectClass=posixGroup))(cn=$this->cn))",get_groups_ou().$this->base,array("cn"));
if ($ldap->count() != 0){
$message[]= _("Value specified as 'Name' is already used.");
diff --git a/gosa-core/plugins/admin/systems/class_printGeneric.inc b/gosa-core/plugins/admin/systems/class_printGeneric.inc
index 585d5e16ae89d81446eef6c474b374ef88347e7e..1a527e96304d132b6162b8d444af20eed32fb08b 100644 (file)
} else {
/* Set base and check if the extracted base exists */
- if(preg_match("/ou=incoming,/",$this->dn)){
- $this->base= preg_replace("/ou=incoming,/","",dn2base($this->dn));
+ if(preg_match("/".normalizePreg('incomingou')."/",$this->dn)){
+ $this->base= preg_replace("/".normalizePreg('incomingou')."/","",dn2base($this->dn));
}else{
$this->base= preg_replace("/".normalizePreg(get_ou('printerou')).",/","",dn2base($this->dn));
}
}
/* Ensure to create a new object */
- if(preg_match("/ou=incoming,/",$this->orig_dn)){
+ if(preg_match("/".normalizePreg('incomingou')."/",$this->orig_dn)){
$this->orig_dn = "new";
}
diff --git a/gosa-core/plugins/admin/systems/class_servGeneric.inc b/gosa-core/plugins/admin/systems/class_servGeneric.inc
index 8497ed86573826b5b3a77c41a9da2c9f514eb2aa..4bc47245cc6260131a6afdd0b6bfd82436d97764 100644 (file)
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,ou=incoming,/",$attrs['dn']) && preg_match("/,".get_ou('serverou')."/",$attrs['dn'])){
+ if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".get_ou('incomingou')."/",$attrs['dn']) && preg_match("/,".get_ou('serverou')."/",$attrs['dn'])){
$message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
break;
}
diff --git a/gosa-core/plugins/admin/systems/class_systemManagement.inc b/gosa-core/plugins/admin/systems/class_systemManagement.inc
index 5e9b28605b8f2ae507873e4522e5cc954cf5c222..205e70316c7bb24cec24fc7a5dc9fec65889df35 100644 (file)
$tabs = array(
"terminal" => get_ou('terminalou'),
"workstation" => get_ou('workstationou'),
- "incoming" => "ou=incoming,",
+ "incoming" => get_ou('incomingou'),
"server" => get_ou('serverou'),
"printer" => get_ou('printerou'),
"phone" => get_ou('phoneou'),
/* Search for incoming objects */
$filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
- $res = array_merge($res,get_list($filter,$sys_categories,"ou=incoming","ou=incoming,".$base,$sys_attrs, GL_NONE | GL_SIZELIMIT));
+ $res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou'),get_ou('incomingou').$base,$sys_attrs, GL_NONE | GL_SIZELIMIT));
/* Get all gotoTerminal's */
foreach ($res as $value){
}
/* check if current object is a new one */
- if (preg_match ("/,ou=incoming,/i", $tmp)){
+ if (preg_match ("/,".get_ou('incomingou')."/i", $tmp)){
if (in_array_ics('gotoTerminal', $value['objectClass'])){
$add= "- "._("New terminal");
}elseif (in_array_ics('gotoWorkstation', $value['objectClass'])){
diff --git a/gosa-core/plugins/admin/systems/class_terminalGeneric.inc b/gosa-core/plugins/admin/systems/class_terminalGeneric.inc
index ac43e3500ddeea41ef79e9e87bc6fbdac762ddb4..3f3f258fe2d26deef236eeef607e8b22d3e98a59 100644 (file)
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,ou=incoming,/", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".normalizePreg(get_ou('incomingou'))."/", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
diff --git a/gosa-core/plugins/admin/systems/class_workstationGeneric.inc b/gosa-core/plugins/admin/systems/class_workstationGeneric.inc
index 73333c4d1413ff82a1dd441fa986b7ad063ef528..1c56e88418ee900b0a5ed514f260be5cb7127896 100644 (file)
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,ou=incoming,/", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".get_ou('incomingou')."/", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
diff --git a/gosa-core/plugins/admin/systems/class_workstationStartup.inc b/gosa-core/plugins/admin/systems/class_workstationStartup.inc
index 0e06a56f32309fd3ee39c9ab68eea0ed14af0624..9e9a4732d027fecb581326de42e7ec6ad0e681c9 100644 (file)
$str = "";
$tmp = split("\/",$release);
$tmp = array_reverse($tmp);
- $base = "ou=fai,ou=configs,ou=systems,";
+ $base = get_ou('faiou');
foreach($tmp as $departmentname){
$str .= ",ou=".$departmentname;
}
diff --git a/gosa-core/plugins/gofax/blocklists/class_blocklistGeneric.inc b/gosa-core/plugins/gofax/blocklists/class_blocklistGeneric.inc
index 19284661d0870feb2755e7d07218761567e0bba9..bbb19426205a71a559f4435ae134e1c2cede4216 100644 (file)
}
if ($this->dn == 'new'){
$ldap= $this->config->get_ldap_link();
- $ldap->cd ("ou=gofax,ou=systems,".$this->config->current["BASE"]);
+ $ldap->cd (get_ou('blocklistou').$this->config->current["BASE"]);
$ldap->search ("(&(|(objectClass=goFaxSBlock)(objectClass=goFaxRBlock))(cn=".$this->cn."))", array("cn"));
if ($ldap->count() != 0){
$message[]= _("Specified name is already used.");
diff --git a/gosa-core/plugins/gofax/blocklists/class_blocklistManagement.inc b/gosa-core/plugins/gofax/blocklists/class_blocklistManagement.inc
index f9b19ea2a94c94f2ca7f42981f47dbfce276aae0..c7e1175c6ac5ad7cc0935403d97ab92d64c36385 100644 (file)
/* Return departments, that will be included within snapshot detection */
function get_used_snapshot_bases()
{
- return(array("ou=gofax,ou=systems,". $this->DivListBlocklist->selectedBase));
+ return(array(get_ou('blocklistou').$this->DivListBlocklist->selectedBase));
}
if($SubSearch){
$Flags |= GL_SUBSEARCH;
}else{
- $base = "ou=gofax,ou=systems,".$base;
+ $base = get_ou('blocklistou').$base;
}
/* Create filter */
diff --git a/gosa-core/plugins/gofax/blocklists/tabs_blocklist.inc b/gosa-core/plugins/gofax/blocklists/tabs_blocklist.inc
index 9293903e1e4033182685eac9ae684ae149ba0425..32a67470584370d3807cb104e72309606c6de210 100644 (file)
$baseobject= $this->by_object['blocklistGeneric'];
/* Check for new 'dn', in order to propagate the 'dn' to all plugins */
- $new_dn= "cn=".$baseobject->cn.",ou=gofax,ou=systems,".$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('blocklistou').$baseobject->base;
/* Move group? */
if ($this->dn != $new_dn){
diff --git a/gosa-core/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-core/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index e0364dc54666e6f9e3cd1f626f59f2d37c021fdf..4f8d0d9d86105b11e9731474c4b0372dd2e27361 100644 (file)
}
} else {
- /* The base is something like this
- "cn=Confis,ou=conferences,ou=asterisk,ou=configs,ou=systems," */
- $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,/", "", $this->dn);
+ /* Get base */
+ $this->base = preg_replace ("/^[^,]+,".normalizePreg(get_ou('conferenceou'))."/i","",$this->dn);;
}
$this->goFonConferenceOwner=$this->ui->dn;
if($this->old_cn != $this->cn || $this->base != $this->old_base){
$ldap = $this->config->get_ldap_link();
- $ldap->cd("ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->base);
+ $ldap->cd(get_ou('conferenceou').$this->base);
$ldap->search("(&(objectClass=goFonConference)(cn=".$this->cn."))",array("cn"));
if($ldap->count()){
$message[] =_("There is already a conference with this name in the current tree.");
diff --git a/gosa-core/plugins/gofon/conference/tabs_conference.inc b/gosa-core/plugins/gofon/conference/tabs_conference.inc
index 5b58065eead3a8aa07c7d8e33f2e410a37897f5b..6b0c545e034b72aca8265b2b6cb771aebae8910a 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['conference'];
- $new_dn= 'cn='.$baseobject->cn.',ou=conferences,ou=asterisk,ou=configs,ou=systems,'.$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.','.get_ou('conferenceou').$baseobject->base;
if(strtolower($this->dn)==strtolower($new_dn)){
$this->dn=$new_dn;