summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 83114e8)
raw | patch | inline | side by side (parent: 83114e8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 14:27:14 +0000 (14:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 14:27:14 +0000 (14:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18296 594d385d-05f5-0310-b6e9-bd551577e9d8
89 files changed:
diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc
index 586f3b11eb57d31a6bf3221c8e2c2fdf7fdc0ad6..5d83308418693cb9e1b529bd53d71660b8797922 100644 (file)
// Migrate objectgroups
$ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
- "ogroups", array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all objectGroups
foreach($ogroups as $ogroup){
// Update roles
$roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
- "roles", array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ "roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all roles
foreach($roles as $role){
$uid = $this->current['object']->uid;
$groups = get_sub_list("(&(objectClass=posixGroup)(memberUid={$suid}))",
- "groups",array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ "groups",array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all POSIX groups
foreach($groups as $group){
index 97c032ce3726d844c4a7debeab1b1499ff3d1496..e50de7e22e022610ba36d91feb7e65cc632abcb2 100644 (file)
*/
function getShareList($listboxEntry = false)
{
- $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("servgeneric", "serverRDN") ,
+ $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverRDN"),
$this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
$return =array();
foreach($tmp as $entry){
$ui = get_userinfo();
$base = $config->current['BASE'];
$res= get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))", "server",
- get_ou("servgeneric", "serverRDN") , $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK);
+ get_ou("serverRDN"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK);
foreach($res as $entry){
index 6e7ec7c85fb3431ca09f8d1e8ec0fb3e4959cd85..1b45db134f9d88a81b8c7421af14293805132468 100644 (file)
// Migrate objectgroups if needed
$ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))",
- "ogroups", array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ "ogroups", array(get_ou("ogroupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all objectGroups
foreach($ogroups as $ogroup){
}
// Migrate rfc groups if needed
- $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all POSIX groups
foreach($groups as $group){
}
/* Update roles to use the new entry dn */
- $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("core", "groupRDN") ),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+ $roles = get_sub_list("(&(objectClass=organizationalRole)(roleOccupant=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","roles", array(get_ou("roleRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
// Walk through all roles
foreach($roles as $role){
index 23badf7125b93de8e525471e009c05e2b48e864f..e7637663a920f936934e2ef2f586673fb0eddfd5 100644 (file)
* Example:
* \code
* # Determine LDAP base where systems are stored
- * $base = get_ou("core", "userRDN") . $this->config->current['BASE'];
+ * $base = get_ou('systemRDN') . $this->config->current['BASE'];
* $ldap->cd($base);
* \endcode
* */
-function get_ou($class,$name)
+function get_ou($name)
{
- global $config;
-
+ global $config;
- // Check if RDN exists.
- if(!$config->configRegistry->propertyExists($class, $name)){
- trigger_error("No department mapping found for type ".$name);
- return "";
+ $map = array(
+ "roleRDN" => "ou=roles,",
+ "ogroupRDN" => "ou=groups,",
+ "applicationRDN" => "ou=apps,",
+ "systemRDN" => "ou=systems,",
+ "serverRDN" => "ou=servers,ou=systems,",
+ "terminalRDN" => "ou=terminals,ou=systems,",
+ "workstationRDN" => "ou=workstations,ou=systems,",
+ "printerRDN" => "ou=printers,ou=systems,",
+ "phoneRDN" => "ou=phones,ou=systems,",
+ "componentRDN" => "ou=netdevices,ou=systems,",
+ "sambaMachineAccountRDN" => "ou=winstation,",
+
+ "faxBlocklistRDN" => "ou=gofax,ou=systems,",
+ "systemIncomingRDN" => "ou=incoming,",
+ "aclRoleRDN" => "ou=aclroles,",
+ "phoneMacroRDN" => "ou=macros,ou=asterisk,ou=configs,ou=systems,",
+ "phoneConferenceRDN" => "ou=conferences,ou=asterisk,ou=configs,ou=systems,",
+
+ "faiBaseRDN" => "ou=fai,ou=configs,ou=systems,",
+ "faiScriptRDN" => "ou=scripts,",
+ "faiHookRDN" => "ou=hooks,",
+ "faiTemplateRDN" => "ou=templates,",
+ "faiVariableRDN" => "ou=variables,",
+ "faiProfileRDN" => "ou=profiles,",
+ "faiPackageRDN" => "ou=packages,",
+ "faiPartitionRDN"=> "ou=disk,",
+
+ "sudoRDN" => "ou=sudoers,",
+
+ "deviceRDN" => "ou=devices,",
+ "mimetypeRDN" => "ou=mime,");
+
+ /* Preset ou... */
+ if ($config->get_cfg_value("core",$name, "_not_set_") != "_not_set_"){
+ $ou= $config->get_cfg_value("core",$name);
+ } elseif (isset($map[$name])) {
+ $ou = $map[$name];
+ return($ou);
+ } else {
+ trigger_error("No department mapping found for type ".$name);
+ return "";
+ }
+
+ if ($ou != ""){
+ if (!preg_match('/^[^=]+=[^=]+/', $ou)){
+ $ou = @LDAP::convert("ou=$ou");
+ } else {
+ $ou = @LDAP::convert("$ou");
}
- $ou = $config->get_cfg_value($class,$name);
- if ($ou != ""){
- if (!preg_match('/^[^=]+=[^=]+/', $ou)){
- $ou = @LDAP::convert("ou=$ou");
- } else {
- $ou = @LDAP::convert("$ou");
- }
- if(preg_match("/".preg_quote($config->current['BASE'], '/')."$/",$ou)){
- return($ou);
- }else{
- return("$ou,");
- }
-
- } else {
- return "";
+ if(preg_match("/".preg_quote($config->current['BASE'], '/')."$/",$ou)){
+ return($ou);
+ }else{
+ return("$ou,");
}
+
+ } else {
+ return "";
+ }
}
/*! \brief Get the OU for users
*
- * Frontend for get_ou("core", "userRDN") with userRDN
+ * Frontend for get_ou() with userRDN
* */
function get_people_ou()
{
- return (get_ou("core", "userRDN") );
+ return (get_ou("userRDN"));
}
/*! \brief Get the OU for groups
*
- * Frontend for get_ou("core", "userRDN") with groupRDN
+ * Frontend for get_ou() with groupRDN
*/
function get_groups_ou()
{
- return (get_ou("core", "userRDN") );
+ return (get_ou("groupRDN"));
}
/*! \brief Get the OU for winstations
*
- * Frontend for get_ou("core", "userRDN") with sambaMachineAccountRDN
+ * Frontend for get_ou() with sambaMachineAccountRDN
*/
function get_winstations_ou()
{
- return (get_ou("core", "userRDN") );
+ return (get_ou("sambaMachineAccountRDN"));
}
diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc
index f866993acddc747c8b0451e5e90f1fdc127f5bae..35151da1edd56fda344ef41f848101898873dfec 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("aclrole", "aclRoleRDN") ); // ACLs are attached to department containers
+ $this->storagePoints = array(get_ou("aclRoleRDN")); // ACLs are attached to department containers
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/acl/tabs_acl_role.inc b/gosa-core/plugins/admin/acl/tabs_acl_role.inc
index c818b6697a6315714cd8ce6eee9dcc018f30dc97..28be2338567e20491201b33fb37ac71e510fe6ae 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.",".get_ou("aclrole", "aclRoleRDN") .$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.",".get_ou('aclRoleRDN').$baseobject->base;
if ($this->dn != $new_dn){
diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc
index d127d5dfbcfd4b1bffff60a99afc303be4a4244d..70ad9abbd4b6b3dd68c123649325875df5ae3115 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "groupRDN") );
+ $this->storagePoints = array(get_ou("groupRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc b/gosa-core/plugins/admin/groups/singleUserSelect/class_singleUserSelect.inc
index a3f76d89c56d1d47b5ac59fc8c1f1ab8e4a45b10..f17008ce81bdfd921cd408679ecc938c46adbd1e 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc b/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc
index 9b3dd3dec016734e277323dfaef2a5ae1a7baa1c..1a76fac6055a41868815d37ea5b602a9da813405 100644 (file)
{
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "groupRDN") , get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"), get_ou("groupRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc b/gosa-core/plugins/admin/groups/userSelect/class_userSelect.inc
index 9a9869456949243a38ca0fe312332fafe0729b86..f5480b9d2b3f57bd0d2c1a949b48125f8dcf9ade 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index afcfb888792285d9548af02dcf2a5d3d8ff20f51..97af881672e44db8ef933f6a2059451e4b08b7b0 100644 (file)
$ui = get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
} else {
- $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN") , '/')."/i","",$this->dn);
+ $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("ogroupRDN"), '/')."/i","",$this->dn);
}
/* Detect all workstations, which are already assigned to an object group
"departments" => array("OBJ"=>"department", "CLASS"=>"gosaDepartment" ,
"DN"=> "" ,"ACL" => "department"),
"servers" => array("OBJ"=>"servgeneric", "CLASS"=>"goServer" ,
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "server"),
+ "DN"=> get_ou('serverRDN') ,"ACL" => "server"),
"workstations" => array("OBJ"=>"workgeneric", "CLASS"=>"gotoWorkstation",
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "workstation"),
+ "DN"=> get_ou('workstationRDN') ,"ACL" => "workstation"),
"winstations" => array("OBJ"=>"wingeneric", "CLASS"=>"opsiClient",
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "winstation"),
+ "DN"=> get_ou('SAMBAMACHINEACCOUNTRDN') ,"ACL" => "winstation"),
"terminals" => array("OBJ"=>"termgeneric", "CLASS"=>"gotoTerminal" ,
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "terminal"),
+ "DN"=> get_ou('terminalRDN') ,"ACL" => "terminal"),
"printers" => array("OBJ"=>"printgeneric", "CLASS"=>"gotoPrinter" ,
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "printer"),
+ "DN"=> get_ou('printerRDN') ,"ACL" => "printer"),
"phones" => array("OBJ"=>"phoneGeneric", "CLASS"=>"goFonHardware" ,
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "phone"));
+ "DN"=> get_ou('phoneRDN') ,"ACL" => "phone"));
/* Allow searching for applications, if we are not using release managed applications
*/
if(!$this->IsReleaseManagementActivated()){
$p_f[ "applications"] = array("OBJ"=>"application", "CLASS"=>"gosaApplication",
- "DN"=> get_ou("group", "ogroupRDN") ,"ACL" => "application");
+ "DN"=> get_ou('applicationRDN') ,"ACL" => "application");
}
/*###########
/* Permissions for that base? */
if ($this->base != ""){
- $new_dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN") .$this->base;
+ $new_dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base;
} else {
$new_dn= $this->dn;
}
/* New accounts need proper 'dn', propagate it to remaining objects */
if ($this->dn == 'new'){
- $this->dn= 'cn='.$this->cn.','.get_ou("group", "ogroupRDN") .$this->base;
+ $this->dn= 'cn='.$this->cn.','.get_ou('ogroupRDN').$this->base;
}
/* Save data. Using 'modify' implies that the entry is already present, use 'add' for
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 460cbe43a2d074f2f1f04a519f98159d26673341..54be3f263455f80ed83332a7f93c1be39feaaf11 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("group", "ogroupRDN") );
+ $this->storagePoints = array(get_ou("ogroupRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc
index 8a22728dd36e1fd3d71098bcfe92188f684b8531..f406bd7f904ec8bf838c6e5790f6eb752b829712 100644 (file)
$this->config = $config;
$this->ui = $ui;
$this->storagePoints = array(
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") );
+ get_ou("userRDN"),
+ get_ou("groupRDN"),
+ get_ou("terminalRDN"),
+ get_ou("workstationRDN"),
+ get_ou("serverRDN"),
+ get_ou("printerRDN"),
+ get_ou("phoneRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc
index f45a36b145982ca72c3256914b5890fd0d01d50f..f7846ba3712157a700ac5057180e8598ef407352 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN") .$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base;
/* Move group? */
if (LDAP::fix($this->dn) != LDAP::fix($new_dn)){
}
if ($this->dn == "new"){
- $this->dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN") .$baseobject->base;
+ $this->dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base;
}
/* Only delete attributes if there are members left */
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 1169437894d884379ba808ab6a63028bf35465d2..f3a5429388d634da07909d8729ff621a2bd82434 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc b/gosa-core/plugins/personal/posix/groupSelect/class_groupSelect.inc
index ec72c63a06ef7549dea510dba6121ec45a4e0272..a44296cf150d59af914024c8259075e4384ba6a7 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "groupRDN") );
+ $this->storagePoints = array(get_ou("groupRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc b/gosa-core/plugins/personal/posix/trustSelect/class_trustSelect.inc
index e352f09af2b789f38f35c4bb3a82867c9d20f6f2..9b449a81c61ef477867736bacfdb05c21fb41eb8 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("workgeneric", "workstationRDN") ,get_ou("terminalRDN", "terminalRDN") ,get_ou("servgeneric", "serverRDN") ,);
+ $this->storagePoints = array(get_ou("workstationRDN"),get_ou("terminalRDN"),get_ou("serverRDN"),);
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_DNS.inc
index 16760fd1f812d3a193a5a8644c2a200681fc2912..ec5ce83c8d2ec963c6d31ad3a5815d534f0b4237 100644 (file)
$ret = array();
$ldap = $config->get_ldap_link();
- $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("servgeneric", "serverRDN") ,
+ $tmp = get_sub_list("(&(objectClass=dNSZone)(sOARecord=*))","",get_ou("serverRDN"),
$config->current['BASE'],array("zoneName"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
foreach($tmp as $at){
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index 02b5719c3d14d30ea8bd54dd925725868de41bbe..f0c0a6d0140d5df83ed4490cd1bb1c5bb22b3105 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiHook", "faiHookRDN") .get_ou("faiHook", "faiHookRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiHookRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIhook",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index a71d286e90b685f2f2a8fcd1e2a42d23114f530e..d07cbe93daf7b0b5deb7b80714fad302156522df 100644 (file)
$this->opsi = new opsi($this->config);;
}
- $this->fai_base = get_ou("mimetype", "mimetypeRDN") .$this->config->current['BASE'];
+ $this->fai_base = get_ou("faiBaseRDN").$this->config->current['BASE'];
$cfg_rel = $this->config->get_cfg_value("faiManagement","defaultFaiRelease");
if(!empty($cfg_rel)){
$this->acl_base = $this->config->current['BASE'];
$this->ui = $ui;
$this->storagePoints = array(
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") ,
- get_ou("mimetype", "mimetypeRDN") );
+ get_ou('faiPartitionRDN'),
+ get_ou('faiPackageRDN'),
+ get_ou('faiScriptRDN'),
+ get_ou('faiVariableRDN'),
+ get_ou('faiHookRDN'),
+ get_ou('faiProfileRDN'),
+ get_ou('faiTemplateRDN'));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
$ldap->cd($bb);
$ldap->recursive_remove();
- $ldap->cd(preg_replace('/,'.preg_quote(get_ou("mimetype", "mimetypeRDN") , '/').'/i', ','.get_ou("mimetype", "mimetypeRDN") , $bb));
+ $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('applicationRDN'), $bb));
$ldap->recursive_remove();
- $ldap->cd(preg_replace('/,'.preg_quote(get_ou("mimetype", "mimetypeRDN") , '/').'/i', ','.get_ou("mimetype", "mimetypeRDN") , $bb));
+ $ldap->cd(preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'/i', ','.get_ou('mimetypeRDN'), $bb));
$ldap->recursive_remove();
/* Search for all groups with configured application menus.
- The search für menu configuration for the specified release and collect all those dns.
- Remove entries
*/
- $release_ou = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/').".*$/i","",$bb);
+ $release_ou = preg_replace("/".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$bb);
$ldap->cd($this->config->current['BASE']);
$ldap->search("(objectClass=posixGroup)",array("dn"));
$targetReleaseDN = "ou=".$name.",".$baseToUse;
- $appsrc = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,$baseToUse);
- $appdst = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,"ou=".$name.",".$baseToUse) ;
+ $appsrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),$baseToUse);
+ $appdst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('applicationRDN'),"ou=".$name.",".$baseToUse) ;
- $mimesrc = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,$baseToUse);
- $mimedst = preg_replace("/".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i",get_ou("mimetype", "mimetypeRDN") ,"ou=".$name.",".$baseToUse) ;
+ $mimesrc = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),$baseToUse);
+ $mimedst = preg_replace("/".preg_quote(get_ou('faiBaseRDN'), '/')."/i",get_ou('mimetypeRDN'),"ou=".$name.",".$baseToUse) ;
/* Check if source depeartments exist */
foreach(array($baseToUse,$appsrc,$mimesrc) as $dep){
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 6a93d97326fab7275f8ad478d4cfe77afe9bbff4..3657b9f6b1bed395182249711b0fa7d760085fb4 100644 (file)
/* Assemble release name */
$release = $this->parent->parent->fai_release;
- $tmp= preg_replace('/[,]*'.preg_quote(get_ou("faiPackage", "faiPackageRDN") , '/').'.*$/i', '', $release);
+ $tmp= preg_replace('/[,]*'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $release);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(explode(',', $tmp));
$this->FAIdebianRelease= "/";
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiPackage", "faiPackageRDN") .get_ou("faiPackage", "faiPackageRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiPackageRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIpackageList",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
if($this->FAIdebianRelease == "ClearFromCopyPaste"){
$current_release = $this->parent->parent->fai_release;
- $tmp= preg_replace('/,'.preg_quote(get_ou("faiPackage", "faiPackageRDN") , '/').'.*$/i', '', $current_release);
+ $tmp= preg_replace('/,'.preg_quote(get_ou('faiBaseRDN'), '/').'.*$/i', '', $current_release);
$tmp= preg_replace('/ou=/', '', $tmp);
$rev= array_reverse(explode(',', $tmp));
$this->FAIdebianRelease= "";
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 5673f307eeb5b852ce7850fa9ba3851adf15fae7..9e4c14deaaa3f38a14aaf20ec8475666a867cc69 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN") .get_ou("faiPartitionTable", "faiPartitionRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiPartitionRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIpartitionTable",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 921537d65aef324a119dab53d97752584acf8e96..2d6fb5b8ba73d2e435ca431409dfc32a63c79a94 100644 (file)
*/
if($this->dn == "new" || $this->cn != $this->old_cn){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiProfile", "faiProfileRDN") .get_ou("faiProfile", "faiProfileRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiProfileRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIprofile",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 9927b089be1dd945ff5d24422a0acba4220611f7..d8283a973dcc6b0998dd9e8a275ac14c454d53c8 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiScript", "faiScriptRDN") .get_ou("faiScript", "faiScriptRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiScriptRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIscript",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc
index 31878b91b0d25d57b154f3584b64fe618a1b5668..16ab54023609f278bd52c43b9e2b84230b7d08b4 100644 (file)
/* Base object configuration */
$this->objs = array(
- "FAIscript" => array( "Image" =>"plugins/fai/images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) ,
- "FAIhook" => array( "Image" =>"plugins/fai/images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ),
- "FAIvariable" => array( "Image" =>"plugins/fai/images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) ,
- "FAItemplate" => array( "Image" =>"plugins/fai/images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) ,
- "FAIpartitionTable" => array( "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) ,
- "FAIpackageList" => array( "Image" =>"plugins/fai/images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ) ,
- "FAIprofile" => array( "Image" =>"plugins/fai/images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou("faiTemplate", "faiTemplateRDN") ));
+ "FAIscript" => array( "Image" =>"plugins/fai/images/fai_script.png", "Name"=>_("Scripts") ,"Tree" =>get_ou('faiScriptRDN')) ,
+ "FAIhook" => array( "Image" =>"plugins/fai/images/fai_hook.png" , "Name"=>_("Hooks") ,"Tree" =>get_ou('faiHookRDN')),
+ "FAIvariable" => array( "Image" =>"plugins/fai/images/fai_variable.png", "Name"=>_("Variables") ,"Tree" =>get_ou('faiVariableRDN')) ,
+ "FAItemplate" => array( "Image" =>"plugins/fai/images/fai_template.png", "Name"=>_("Templates") ,"Tree" =>get_ou('faiTemplateRDN')) ,
+ "FAIpartitionTable" => array( "Image" =>"plugins/fai/images/fai_partitionTable.png","Name"=>_("Partition table") ,"Tree" =>get_ou('faiPartitionRDN')) ,
+ "FAIpackageList" => array( "Image" =>"plugins/fai/images/fai_packages.png", "Name"=>_("Package list") ,"Tree" =>get_ou('faiPackageRDN')) ,
+ "FAIprofile" => array( "Image" =>"plugins/fai/images/fai_profile.png", "Name"=>_("Profiles") ,"Tree" =>get_ou('faiProfileRDN')));
}
/* Get Classes and release */
$this->Classes = $this->parent->by_object['faiProfile']->FAIclasses;
$this->base = $this->parent->by_object['faiProfile']->parent->parent->fai_release;
- $str = preg_replace("/^.*".preg_quote(get_ou("faiTemplate", "faiTemplateRDN") , '/')."/i","",$this->dn);
+ $str = preg_replace("/^.*".preg_quote(get_ou('faiProfileRDN'), '/')."/i","",$this->dn);
$tmp = $this->parent->by_object['faiProfile']->parent->parent->getBranches();
$this->Release = $tmp[$this->base];
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index 27591a8c4f636049a1605b49c3f4eaae2005d06e..4ece4344c030ba81d9190eef9c3e9a4c92da017f 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiTemplate", "faiTemplateRDN") .get_ou("faiTemplate", "faiTemplateRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiTemplateRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAItemplate",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index 8fce416eb6d06ed600baceba5816d8452d99f6ad..78546c48361f1cee7689e2377baf375726243336 100644 (file)
*/
if($this->is_new){
$release = $this->parent->parent->fai_release;
- $new_dn= 'cn='.$this->cn.",".get_ou("faiVariable", "faiVariableRDN") .get_ou("faiVariable", "faiVariableRDN") .$release;
+ $new_dn= 'cn='.$this->cn.",".get_ou('faiVariableRDN').get_ou('faiBaseRDN').$release;
$res = faiManagement::check_class_name("FAIvariable",$this->cn,$new_dn);
if(isset($res[$this->cn])){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/fai/admin/fai/class_filterFAI.inc b/gosa-plugins/fai/admin/fai/class_filterFAI.inc
index c2707b218acda6d0d6ffe2259b901c575953b16b..155b95e4730772a9abb42af1a52db657c8940903 100644 (file)
* Generate List of Partitions,Hooks,Scripts,Templates,Profiles ...
*/
$ObjectTypes = array(
- "FAIpartitionTable" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowPartitions" ,
+ "FAIpartitionTable" => array("OU"=> get_ou('faiPartitionRDN') , "CHKBOX"=>"ShowPartitions" ,
"ACL" => "faiPartitionTable"),
- "FAIpackageList" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowPackages" ,
+ "FAIpackageList" => array("OU"=> get_ou('faiPackageRDN') , "CHKBOX"=>"ShowPackages" ,
"ACL" => "faiPackage"),
- "FAIscript" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowScripts" ,
+ "FAIscript" => array("OU"=> get_ou('faiScriptRDN') , "CHKBOX"=>"ShowScripts" ,
"ACL" => "faiScript"),
- "FAIvariable" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowVariables" ,
+ "FAIvariable" => array("OU"=> get_ou('faiVariableRDN') , "CHKBOX"=>"ShowVariables" ,
"ACL" => "faiVariable"),
- "FAIhook" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowHooks" ,
+ "FAIhook" => array("OU"=> get_ou('faiHookRDN') , "CHKBOX"=>"ShowHooks" ,
"ACL" => "faiHook"),
- "FAIprofile" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowProfiles" ,
+ "FAIprofile" => array("OU"=> get_ou('faiProfileRDN') , "CHKBOX"=>"ShowProfiles" ,
"ACL" => "faiProfile"),
- "FAItemplate" => array("OU"=> get_ou("faiTemplate", "faiTemplateRDN") , "CHKBOX"=>"ShowTemplates" ,
+ "FAItemplate" => array("OU"=> get_ou('faiTemplateRDN') , "CHKBOX"=>"ShowTemplates" ,
"ACL" => "faiTemplate"));
/* Clean up object informations */
$obj = array();
$obj['cn'] = $object['cn'][0];
- $obj['dn'] = $object['cn'][0].",".get_ou("faiTemplate", "faiTemplateRDN") .$config->current['BASE'];
+ $obj['dn'] = $object['cn'][0].",".get_ou("faiBaseRDN").$config->current['BASE'];
$obj['acl'] = $acl;
$obj['class'] = $rest ['ACL'];
$obj['FAIstate'] = $entry['FAIstate'];
// Append opsi stuff ...
- if(class_available('opsi') && $base == get_ou("faiTemplate", "faiTemplateRDN") .$config->current['BASE']){
+ if(class_available('opsi') && $base == get_ou("faiBaseRDN").$config->current['BASE']){
$opsi = new opsi($config);
$objects = array();
if($opsi instanceof opsi && $opsi->enabled()){
index a64166ff365c69a6b4fb1b6b644147b9f87c13df..40c997c767e8378f8b81c71c26c294a2683db3dc 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiHook'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiHook", "faiHookRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiHookRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/fai/admin/fai/tabsPackage.inc b/gosa-plugins/fai/admin/fai/tabsPackage.inc
index c134dccdb5670f6ee844e4006c1d4fc0d96fe1f7..835933f79a9617d484b2f48688242ebe11274544 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiPackage'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPackage", "faiPackageRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPackageRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/fai/admin/fai/tabsPartition.inc b/gosa-plugins/fai/admin/fai/tabsPartition.inc
index f7a4815392b2e2ee0ef9ea698fe81b1338010298..3ac0e2257d92261f9e529183851860b777e61893 100644 (file)
{
$baseobject= $this->by_object['faiPartitionTable'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiPartitionTable", "faiPartitionRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPartitionRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/fai/admin/fai/tabsProfile.inc b/gosa-plugins/fai/admin/fai/tabsProfile.inc
index 4d1450712b465fc89e1eca18b8a071341a116d9a..3773637e0f4079ab251075b79bd2736d106f55d2 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiProfile'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiProfile", "faiProfileRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiProfileRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
index 692b6d5499b6ec8905ddffe565343ee6a7f9ed10..7cf0a027e2fd887c1991104ba7e07c49f8c16d4f 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiScript'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiScript", "faiScriptRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiScriptRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/fai/admin/fai/tabsTemplate.inc b/gosa-plugins/fai/admin/fai/tabsTemplate.inc
index 2f1b43b34b4635e891dcb631a2accff699abfb9f..e47096fd32b3782c39e208712faca501967f784a 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiTemplate'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiTemplate", "faiTemplateRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiTemplateRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/fai/admin/fai/tabsVariable.inc b/gosa-plugins/fai/admin/fai/tabsVariable.inc
index dd9f8da715c3dbc4b44fedb46e5aa376ed8e1be6..5a636be08f206391d354ba452ea3d9924147e5d9 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['faiVariable'];
- $new_dn ='cn='.$baseobject->cn.",".get_ou("faiVariable", "faiVariableRDN") .$this->parent->fai_release;
+ $new_dn ='cn='.$baseobject->cn.",".get_ou('faiVariableRDN').$this->parent->fai_release;
if ($this->dn != $new_dn && $this->dn != "new"){
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
index 9d1c44c8fa8db11eabe842bf615f2fa4c7420508..05c41436d11097d15e6f6c4038acf838356ca9cc 100644 (file)
$this->base= dn2base($ui->dn);
}
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("blocklistGeneric", "faxBlocklistRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("faxBlocklistRDN"), '/')."/i", "", $this->dn);
}
$this->orig_base = $this->base;
}
if ($this->dn == 'new'){
$ldap= $this->config->get_ldap_link();
- $ldap->cd (get_ou("blocklistGeneric", "faxBlocklistRDN") .$this->config->current["BASE"]);
+ $ldap->cd (get_ou('faxBlocklistRDN').$this->config->current["BASE"]);
$ldap->search ("(&(|(objectClass=goFaxSBlock)(objectClass=goFaxRBlock))(cn=".$this->cn."))", array("cn"));
if ($ldap->count() != 0){
$message[]= msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
index 07bcaa5bb38bc3b8c812d3030fd8026c6d05880b..4f59ce256a576cf81bfeb69b187bd262cc5b2c09 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("blocklistGeneric", "faxBlocklistRDN") );
+ $this->storagePoints = array(get_ou("faxBlocklistRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc b/gosa-plugins/gofax/gofax/blocklists/tabs_blocklist.inc
index d280acdc0db05747ee855d4c87825b2125e97f7c..54a378674caab0e73b02d45936497184023e5f37 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.",".get_ou("blocklistGeneric", "faxBlocklistRDN") .$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('faxBlocklistRDN').$baseobject->base;
/* Move group? */
if ($this->dn != $new_dn){
diff --git a/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc b/gosa-plugins/gofax/gofax/faxaccount/faxNumberSelect/class_faxNumberSelect.inc
index 257d1bf635353d93262f1f3cb43e61780ba1ef85..f995d0d3f992cc8b6760ae39e5f1ea62663dda7a 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
index 05b8544103521f83fba1a4a570cdbacbd38340d4..b5ef3d31801498a66566a5e77f7fe914b293d298 100644 (file)
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneGeneric", "phoneRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneRDN"), '/')."/i", "", $this->dn);
}
if($this->goFonMSN != ""){
$message= plugin::check();
$message= array_merge($message, $this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou("phoneGeneric", "phoneRDN") .$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('phoneRDN').$this->base;
/* To check for valid ip*/
if($this->netConfigDNS->ipHostNumber == ""){
diff --git a/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc b/gosa-plugins/gofon/admin/systems/gofon/tabs_phone.inc
index b43bec434c3c2f5691a9ed18b26dde1204901e90..b8a85905814a36caa918fb90ac3754f0303f27bd 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['phoneGeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou("phoneGeneric", "phoneRDN") .$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou('phoneRDN').$baseobject->base;
$baseobject->dn= $this->dn;
foreach ($this->by_object as $key => $obj){
diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
index f77df2ba2be27bdcf51f0f4d3e6813476dc1cac7..eb56f14a8085c659cc52998ad3970936cb9856cd 100644 (file)
} else {
/* Get base */
- $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou("conference", "phoneConferenceRDN") , '/')."/i","",$this->dn);;
+ $this->base = preg_replace ("/^[^,]+,".preg_quote(get_ou('phoneConferenceRDN'), '/')."/i","",$this->dn);;
}
$this->goFonConferenceOwner=$this->ui->dn;
if($this->old_cn != $this->cn || $this->base != $this->old_base){
$ldap = $this->config->get_ldap_link();
- $ldap->cd(get_ou("conference", "phoneConferenceRDN") .$this->base);
+ $ldap->cd(get_ou('phoneConferenceRDN').$this->base);
$ldap->search("(&(objectClass=goFonConference)(cn=".$this->cn."))",array("cn"));
if($ldap->count()){
$message[] = msgPool::duplicated(_("Name"));
diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc
index d5b21635cac5aaf5b8d5217c8e7248ee2da93572..113eb5075299b4fff6db363d301b589633718ed5 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("conference", "phoneConferenceRDN") );
+ $this->storagePoints = array(get_ou("phoneConferenceRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/gofon/gofon/conference/tabs_conference.inc b/gosa-plugins/gofon/gofon/conference/tabs_conference.inc
index 5cf4dd4d81bba7a12129ba8680151f4ed54fe673..8d51b1f9bb95bde204288502fbf20838a6b38e59 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['conference'];
- $new_dn= 'cn='.$baseobject->cn.','.get_ou("conference", "phoneConferenceRDN") .$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.','.get_ou('phoneConferenceRDN').$baseobject->base;
if(strtolower($this->dn)==strtolower($new_dn)){
$this->dn=$new_dn;
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
index 87605cc4e49c1362cf32eb69ba0124b7dc5df3d5..fc9f8809da04442666d84ba95fc6249f5be56e24 100644 (file)
}
} else {
$this->orig_cn=$this->cn;
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("macro", "phoneMacroRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("phoneMacroRDN"), '/')."/i", "", $this->dn);
}
/* Check server configurations
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc
index a44b1d6b219fdec82aaf93b0cc958b178e8688b8..af074a93638c1701f22d204f350ee43859131b63 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("macro", "phoneMacroRDN") );
+ $this->storagePoints = array(get_ou("phoneMacroRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/gofon/gofon/macro/tabs_macros.inc b/gosa-plugins/gofon/gofon/macro/tabs_macros.inc
index 7a4626e6c4bbd639143892846b55736c04da40bf..f874015e40b23674dff177b529105e059e96bf49 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= "cn=".$baseobject->cn.",".get_ou("macro", "phoneMacroRDN") .$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('phoneMacroRDN').$baseobject->base;
/* Move group? */
if ($this->dn != $new_dn){
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index 5788adbccb1057cbc6b04982a5ea4d2b5bf4aad1..672f51c391c19ad22c5ce8c52b42587a5b2d0fbf 100644 (file)
/* Get available phone hardware
* Search for all available phone hardware
*/
- $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("group", "ogroupRDN") ),
+ $tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneRDN")),
$this->config->current['BASE'],array("cn","description"), GL_SUBSEARCH);
foreach($tmp as $attrs){
$cn= $attrs['cn'][0];
*/
$deps_a = array(
get_people_ou(),
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") );
+ get_ou("ogroupRDN"),
+ get_ou("serverRDN"),
+ get_ou("terminalRDN"),
+ get_ou("workstationRDN"),
+ get_ou("printerRDN"),
+ get_ou("componentRDN"),
+ get_ou("phoneRDN"));
$tmp = get_sub_list("(goFonHardware=*)","phone",$deps_a,$this->config->current['BASE'],
array('cn','dn','goFonHardware'),GL_SUBSEARCH);
* Search for all Macros that are visible and create
* an array with name and parameters
*/
- $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("group", "ogroupRDN") ),
+ $tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("phoneMacroRDN")),
$this->config->current['BASE'],array("displayName","goFonMacroParameter","dn","cn"), GL_NO_ACL_CHECK | GL_SUBSEARCH );
diff --git a/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc b/gosa-plugins/goto/addons/goto/events/class_EventAddSystemDialog.inc
index 5f905011e818c1a51335f9af2e4f0ca2b2cfbd11..f7ba9ec8e30a0839dbd90c7f9e12fde1282e4eb6 100644 (file)
$this->config = $config;
$this->ui = $ui;
$this->storagePoints = array(
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") );
+ get_ou("serverRDN"),
+ get_ou("workstationRDN"),
+ get_ou("ogroupRDN"),
+ get_ou('terminalRDN'));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc b/gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc
index e5a99a8c8a896ab4e56b44298aa0ca0eb34e34be..0649761c88422e0a946242bf1f8adc21979a691f 100644 (file)
$this->config = $config;
$this->ui = $ui;
$this->storagePoints = array(
- get_ou("core", "userRDN") ,
- get_ou("core", "userRDN") );
+ get_ou("userRDN"),
+ get_ou("groupRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 0b077299dea5b8f3c270add9295f581563017874..bf11b1f7aba247fc43dd11fe70a9124912a42532 100644 (file)
$this->base= dn2base($ui->dn);
}
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("application", "applicationRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou('applicationRDN'), '/')."/i", "", $this->dn);
}
$this->orig_cn = $this->cn;
function remove_from_parent()
{
/* Parse release out of object dn */
- $release = preg_replace("/".preg_quote(get_ou("application", "applicationRDN") .$this->base, '/')."$/i","",$this->dn);
+ $release = preg_replace("/".preg_quote(get_ou("applicationRDN").$this->base, '/')."$/i","",$this->dn);
$release = preg_replace("/^cn=[^,]+,/","",$release);
/* Get a list of all groups
/* Permissions for that base? */
if ($this->base != ""){
- $new_dn= "cn=".$this->cn.",".get_ou("application", "applicationRDN") .$this->base;
+ $new_dn= "cn=".$this->cn.",".get_ou('applicationRDN').$this->base;
} else {
$new_dn= $this->dn;
}
if($this->is_release()){
$base = $this->parent->parent->app_release;
}else{
- $base = get_ou("application", "applicationRDN") .$this->base;
+ $base = get_ou('applicationRDN').$this->base;
}
$ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$base,array("cn"));
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index 10530fcda11d76201ca93e7f78d5c5cb0d8ec6c8..3cd74a415ee67d604dae69a7711c92027591ab19 100644 (file)
{
$this->config = $config;
$this->ui = $ui;
- $this->app_base = get_ou("application", "applicationRDN") .$this->config->current['BASE'];
- $this->app_release = get_ou("application", "applicationRDN") .$this->config->current['BASE'];
+ $this->app_base = get_ou('applicationRDN').$this->config->current['BASE'];
+ $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
if($this->IsReleaseManagementActivated()){
$filter_xml = "application-filter-release.xml";
}else{
$filter_xml = "application-filter.xml";
$list_xml = "application-list.xml";
- $this->storagePoints= array(get_ou("application", "applicationRDN") );
+ $this->storagePoints= array(get_ou("applicationRDN"));
}
// Build filter
diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc
index 8b96459f3676fd05369c61d966fb3eaec9c6801c..bf7a311f27bc76114d6e7572b4b39ee82ffbf475 100644 (file)
if($baseobject->parent->parent->IsReleaseManagementActivated()){
$new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
}else{
- $new_dn= "cn=".$baseobject->cn.",".get_ou("application", "applicationRDN") .$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
}
// Do we have to move the object?
diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index 81993e1a2e27dc849553b26268feb8de091becd4..037963de6088bed57a04b39341881eeb0f984fd5 100644 (file)
$this->base= dn2base($ui->dn);
}
} else {
- $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou("deviceGeneric", "deviceRDN") , '/')."/i","",$this->dn);
+ $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou('deviceRDN'), '/')."/i","",$this->dn);
}
$this->orig_base = $this->base;
$this->orig_dn = $this->dn;
diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc
index 606f7b819877abf135a7917282696f879f744638..7ec0081b59cd2ce27ed401237dec1bd7135aea24 100644 (file)
$filter_xml = "device-filter.xml";
$list_xml = "device-list.xml";
- $this->storagePoints= array(get_ou("deviceGeneric", "deviceRDN") );
+ $this->storagePoints= array(get_ou("deviceRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/goto/admin/devices/tabs_devices.inc b/gosa-plugins/goto/admin/devices/tabs_devices.inc
index 12904f5a78db91f076b5665a9ed86a0ff51958a2..e2b49799385024dc60971ddce09f271dac46b669 100644 (file)
function save($ignore_account= FALSE)
{
$baseobject= $this->by_object['deviceGeneric'];
- $new_dn= "cn=".$baseobject->cn.",".get_ou("deviceGeneric", "deviceRDN") .$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('deviceRDN').$baseobject->base;
/* Move group? */
if ($this->dn != $new_dn){
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 61bcba267337bda5687d47871bcd3ba87ff35f1a..2f6e60a2ca39c6a2ee1646ad86604df75f4714d6 100644 (file)
*/
function getReleases()
{
- $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou("application", "applicationRDN") ));
+ $ret =array("/" => array("name" => "/", "found" => TRUE , "parts" => array(),"suffix" => get_ou('applicationRDN')));
if($this->enableReleaseManagement){
/* Only display those releases that we are able to read
*/
- $dn = get_ou("application", "applicationRDN") .$this->config->current['BASE'];
+ $dn = get_ou("applicationRDN").$this->config->current['BASE'];
$filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))";
$res = get_sub_list($filter,array("application","fai"),
- array(get_ou("application", "applicationRDN") ,get_ou("faiManagement","faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH);
+ array(get_ou("applicationRDN"),get_ou("faiBaseRDN")),$dn, array("ou","FAIstate"), GL_SUBSEARCH);
/* Go through all departments and check which department is a valid
department release.
*/
foreach($res as $attrs){
- if(preg_match("/".get_ou("application", "applicationRDN") ."/i",$attrs['dn'])){
+ if(preg_match("/".get_ou('applicationRDN')."/i",$attrs['dn'])){
/* Parse all returned departments dns into a useable type.
(ou=1.0.0,ou=halut,ou=apps ==> halue/1.0.0)
*/
- $bb = preg_replace("/".preg_quote(get_ou("application", "applicationRDN") , '/').".*/i","",$attrs['dn']);
+ $bb = preg_replace("/".preg_quote(get_ou('applicationRDN'), '/').".*/i","",$attrs['dn']);
$parts = array_reverse(explode("ou=",$bb));
$str ="";
"found" => $found,
"FAIstate" => $FAIstate,
"dn" => $attrs['dn'],
- "parts" => $parts,"suffix" => $bb.get_ou("application", "applicationRDN") );
+ "parts" => $parts,"suffix" => $bb.get_ou('applicationRDN'));
}
}
}
$used_apps = $this->_get_used_entry_name();
foreach($this->apps as $key => $app){
if(in_array($app['cn'][0],$used_apps)) continue;
- if(!preg_match("/".get_ou("application", "applicationRDN") .preg_quote($this->curbase, '/')."$/",$app['dn'])){
+ if(!preg_match("/".get_ou('applicationRDN').preg_quote($this->curbase, '/')."$/",$app['dn'])){
continue;
}
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index fb6bc873378705ea6ff3ae3d065567f4fd9e1428..2b85b69d571e07259a05787bf6db7fbaa40639ec 100644 (file)
$this->base= dn2base($ui->dn);
}
} else {
- $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetype", "mimetypeRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/i", "", $this->dn);
}
/* Get icon data */
if($this->is_release()){
$base = $this->parent->parent->mime_release;
}else{
- $base = get_ou("mimetype", "mimetypeRDN") .$this->base;
+ $base = get_ou("mimetypeRDN").$this->base;
}
$ldap->ls("(&(objectClass=gotoMimeType)(cn=".$this->cn."))",$base,array("cn"));
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
index 4967916bde0c5badab7a807cc1cb63b3d0f764ca..5c287006c39be6886bd64a9ee475872ee97f47be 100644 (file)
{
$this->config = $config;
$this->ui = $ui;
- $this->mime_base = get_ou("mimetype", "mimetypeRDN") .$this->config->current['BASE'];
- $this->mime_release = get_ou("mimetype", "mimetypeRDN") .$this->config->current['BASE'];
+ $this->mime_base = get_ou('mimetypeRDN').$this->config->current['BASE'];
+ $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE'];
if($this->IsReleaseManagementActivated()){
$filter_xml = "mimetype-filter-release.xml";
}else{
$filter_xml = "mimetype-filter.xml";
$list_xml = "mimetype-list.xml";
- $this->storagePoints= array(get_ou("mimetype", "mimetypeRDN") );
+ $this->storagePoints= array(get_ou("mimetypeRDN"));
}
// Build filter
diff --git a/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc b/gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc
index 33094eb0d4d11daaccf940242d875b3a1700407a..dacda448687497bbe79d4925737e05ab1c7a10cd 100644 (file)
if($this->parent->IsReleaseManagementActivated()){
$new_dn= "cn=".$baseobject->cn.",".$this->parent->mime_release;
}else{
- $new_dn= "cn=".$baseobject->cn.",".get_ou("mimetype", "mimetypeRDN") .$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeRDN').$baseobject->base;
}
/* Move group? */
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 39746e916a0c643fb1a7a57da9a91d2ce7a065f1..c420b2f1d5d93f893d7002ac93fa0271c5a46c02 100644 (file)
/* Update dn, to ensure storing as printer instead of WS / terminal */
if(preg_match("/Terminal/i",$this->BelongsTo) || preg_match("/TerminalTemplate/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
$this->orig_dn = $this->dn;
} else {
/* Set base and check if the extracted base exists */
- if(preg_match("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",$this->dn)){
- $this->base= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i","",dn2base($this->dn));
+ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->dn)){
+ $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i","",dn2base($this->dn));
}else{
- $this->base= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i","",dn2base($this->dn));
+ $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/i","",dn2base($this->dn));
}
if(!isset($this->config->idepartments[$this->base])){
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
/* Detect if this is a valid printer account;
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/').",/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
/* Check if this dn points to a printer, to avoid deleting something else */
}
}
- $dn= "cn=".$this->cn.get_ou("workgeneric", "workstationRDN") .",".$this->base;
+ $dn= "cn=".$this->cn.get_ou('printerRDN').",".$this->base;
/* must: cn */
if(($this->BelongsTo == "Printer") && $this->cn == ""){
if (($this->orig_dn != $dn)&&( preg_match("/printer/i",$this->BelongsTo))){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
- $ldap->ls("(cn=".$this->cn.")",get_ou("workgeneric", "workstationRDN") .$this->base, array("cn"));
+ $ldap->ls("(cn=".$this->cn.")",get_ou('printerRDN').$this->base, array("cn"));
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if(preg_match("/cn=dhcp,/",$attrs['dn'])){
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",get_ou("workgeneric", "workstationRDN") ,$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(!$this->is_account) return;
}
/* Ensure to create a new object */
- if(preg_match("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",$this->orig_dn)){
+ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->orig_dn)){
$this->orig_dn = "new";
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 374b411339443a6bc62f105e04b43f542c72113b..6564b864c05b8af0695e334be69ae61e635bf09b 100644 (file)
if ($this->dn == "new"){
$ui= get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
- } elseif(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", $this->dn)){
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn);
}
/* Create an array of all Syslog servers */
}
/* Permissions for that base? */
- $this->dn= "cn=".$this->cn.",".get_ou("ArpNewDevice", "systemIncomingRDN") .$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('terminalRDN').$this->base;
if ($this->cn == ""){
$message[]= msgPool::required(_("Name"));
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
- $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") , '/')."/i", "", $this->dn);
+ $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
$tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
/* Walk from top to base and try to load default values for
while (TRUE){
$tmp= preg_replace ("/^[^,]+,/", "", $tmp);
- $ldap->cat("cn=default,".get_ou("ArpNewDevice", "systemIncomingRDN") .$tmp.
+ $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp.
$this->config->current['BASE'], array('gotoTerminalPath'));
$attrs= $ldap->fetch();
if (isset($attrs['gotoTerminalPath'])){
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
index a7d91c1ddb742433f16dea36b118433a3a0fd924..28846fd5049d62352e1918fbde38063deb774000 100644 (file)
/* Load phone hardware list
*/
- $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("group", "ogroupRDN") ),
+ $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")),
$this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
foreach($tmp as $attrs){
$cn= $attrs['cn'][0];
*/
$deps_a = array(
get_people_ou(),
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") );
+ get_ou("ogroupRDN"),
+ get_ou("serverRDN"),
+ get_ou("terminalRDN"),
+ get_ou("workstationRDN"),
+ get_ou("printerRDN"),
+ get_ou("componentRDN"),
+ get_ou("phoneRDN"));
$tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'],
array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
*/
$p = $this->parent->by_object['ogroup'];
foreach($p->memberList as $dn => $obj){
- if(preg_match("/".preg_quote(get_ou("group", "ogroupRDN") , '/')."/",$dn)) continue;
+ if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
$macs[] = $p->objcache[$dn]['macAddress'];
}
/* We are a workstation. Add current mac.
*/
$mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
- if(!empty($mac) && !preg_match("/".preg_quote(get_ou("group", "ogroupRDN") , '/')."/",$this->orig_dn)){
+ if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
$macs[] = $mac;
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index 53f4324dd571df535e96071a502afa034f3b805b..b5ff4338ccee2d54b42253e8b04a8157c10400a4 100644 (file)
if ($this->dn == "new"){
$ui= get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
- } elseif(preg_match("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", $this->dn)){
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", "", $this->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
}else{
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("workstationRDN"), '/')."/i", "", $this->dn);
}
/* Create an array of all Syslog servers */
$message= array_merge($message, $this->netConfigDNS->check());
}
- $this->dn= "cn=".$this->cn.",".get_ou("workgeneric", "workstationRDN") .$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('workstationRDN').$this->base;
if ($this->cn == ""){
$message[]= msgPool::required(_("Name"));
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
}else{
/* Warn the user, that this host is currently installing */
if($this->currently_installing && !$this->currently_installing_warned &&
- !preg_match("/".preg_quote(get_ou("workgeneric", "workstationRDN") , '/')."/i",$this->orig_dn)){
+ !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
/* Force aborting without message dialog */
$message[] = "";
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
index b2e4cc281a9eb5cf68eaad51f298a74d11421ee1..4b131ec53ee2d3e83809d10751cecb9a8337ada9 100644 (file)
/* Load phone hardware list
*/
- $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("group", "ogroupRDN") ),
+ $tmp = get_sub_list("(objectClass=goFonHardware)","",array(get_ou("phoneRDN")),
$this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
foreach($tmp as $attrs){
$cn= $attrs['cn'][0];
*/
$deps_a = array(
get_people_ou(),
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") ,
- get_ou("group", "ogroupRDN") );
+ get_ou("ogroupRDN"),
+ get_ou("serverRDN"),
+ get_ou("terminalRDN"),
+ get_ou("workstationRDN"),
+ get_ou("printerRDN"),
+ get_ou("componentRDN"),
+ get_ou("phoneRDN"));
$tmp = get_sub_list("(goFonHardware=*)","",$deps_a,$this->config->current['BASE'],
array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
*/
$p = $this->parent->by_object['ogroup'];
foreach($p->memberList as $dn => $obj){
- if(preg_match("/".preg_quote(get_ou("group", "ogroupRDN") , '/')."/",$dn)) continue;
+ if(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$dn)) continue;
if(isset($p->objcache[$dn]['macAddress']) && !empty($p->objcache[$dn]['macAddress'])){
$macs[] = $p->objcache[$dn]['macAddress'];
}
/* We are a workstation. Add current mac.
*/
$mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
- if(!empty($mac) && !preg_match("/".preg_quote(get_ou("group", "ogroupRDN") , '/')."/",$this->orig_dn)){
+ if(!empty($mac) && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
$macs[] = $mac;
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 894f5e7588da8c12bc5ca466f8a851d052787033..d28a4b20149209c3da65e5e72d8f4dd056c12062 100644 (file)
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
- $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN") , '/')."/i", "", $this->dn);
+ $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
$tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
/* Walk from top to base and try to load default values for
while (TRUE){
$tmp= preg_replace ("/^[^,]+,/", "", $tmp);
- $ldap->cat("cn=default,".get_ou("termgeneric", "terminalRDN") .$tmp.
+ $ldap->cat("cn=default,".get_ou('terminalRDN').$tmp.
$this->config->current['BASE'], array('gotoTerminalPath'));
$attrs= $ldap->fetch();
if (isset($attrs['gotoTerminalPath'])){
*/
function dn_to_release_name($dn)
{
- $relevant = preg_replace("/,".preg_quote(get_ou("termgeneric", "terminalRDN") , '/').".*$/i","",$dn);
+ $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$dn);
$parts = array_reverse(explode(",",$relevant));
$str ="";
foreach($parts as $part){
diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc
index cd93fa1b4346f2f53441e664fe55d9f86e98e5a8..6a7e0e02d4323b767aa355e05fa1793f68e543c2 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['printgeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou("printgeneric", "printerRDN") .$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou('printerRDN').$baseobject->base;
$baseobject->dn= $this->dn;
foreach ($this->by_object as $key => $obj){
diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc
index b016331a5b0aad2cfc9fd6652c290cc1ffd4ed10..b1adb932836e4177e9f932b1fe2ff037c623630b 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['termgeneric'];
- $this->dn= "cn=".$baseobject->cn.",".get_ou("termgeneric", "terminalRDN") .$baseobject->base;
+ $this->dn= "cn=".$baseobject->cn.",".get_ou('terminalRDN').$baseobject->base;
$baseobject->dn= $this->dn;
if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc
index 4d0a4e80a7f03e82af4db92876dac2e1857d3933..32bcaea5c2ba75c7d882c25452dfbd628153d5b7 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['workgeneric'];
- $this->dn= "cn=".$baseobject->cn.",".get_ou("workgeneric", "workstationRDN") .$baseobject->base;
+ $this->dn= "cn=".$baseobject->cn.",".get_ou('workstationRDN').$baseobject->base;
if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc b/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc
index 4ca2f5e71c057ce0fc2b99cac97ef66555b31bbc..d62ad841ae82603c826cf1cc8033fe3fb1ed1737 100644 (file)
function process_mounts() {
- $clip = "cn=" . $this->cn . ",".get_ou("servgeneric", "serverRDN") ;
+ $clip = "cn=" . $this->cn . ",".get_ou('serverRDN');
$mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
$mounts = array(
diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc b/gosa-plugins/goto/admin/systems/services/shares/class_servNfs.inc
index 672f071b8b8c472165a7def6bc2e7ff73487e84a..8e50b5fc20228347344fdd49e6b972ba990cb847 100644 (file)
$smarty->assign("mount_checked", "checked");
} else {
$tmp = explode(",", $this->dn);
- $clip = $tmp[0] . ",".get_ou("servgeneric", "serverRDN") ;
+ $clip = $tmp[0] . ",".get_ou('serverRDN');
$mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
switch ($this->type) {
case "netatalk" : {
diff --git a/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc b/gosa-plugins/goto/personal/environment/hotplugSelect/class_hotplugSelect.inc
index 9f2c4ac100ad5f126356ebe592dda768da4b99a2..fa512efdabc949eb3642ea7a0f2aa3915bcbd978 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("deviceGeneric", "deviceRDN") );
+ $this->storagePoints = array(get_ou("deviceRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc b/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc
index c05f094d9518953632cd59fa4e2ac11089171358..bf42dec6c66bdf60618e39d8d8a48e5db8ae825c 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("printgeneric", "printerRDN") );
+ $this->storagePoints = array(get_ou("printerRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc
index 2f69f77e12492a07b5abaeadf0b08db7929191ac..90e835c925cddc6755459592b509f1f61076243c 100644 (file)
$smarty->assign("deplist", $bases);
$smarty->assign("choicelist",array( get_people_ou() =>"users" ,
get_groups_ou() =>"groups" ,
- get_ou("servgeneric", "serverRDN") =>"computers",
- get_ou("servgeneric", "serverRDN") =>"servers",
+ get_ou('systemRDN') =>"computers",
+ get_ou('serverRDN') =>"servers",
"dc=addressbook," =>"addressbook"));
// Get the LDAP link, to generate the Export
index e0f3fc0471e2e3ad332f0087fe06f30d09c5911c..b4f19fbc41d6fee0a5ac7b50b6ec7d66556f2e7b 100644 (file)
/* SYSTEMS
Get all systems from th $dn
and put them into the xls work sheet */
- case get_ou("servgeneric", "serverRDN") :
+ case get_ou('systemRDN'):
$name_section=_("Servers");
$computers= $ldap->gen_xls($dn,"(&(objectClass=*)(cn=*))",array("cn","description","uid"));
/* SYSTEMS
Get all systems from th $dn
and put them into the xls work sheet */
- case get_ou("servgeneric", "serverRDN") : $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
+ case get_ou('serverRDN'): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
$intitul=array(_("Server name").":");
//name of the xls file
$computers= $ldap->gen_xls("ou=computers,".$dn,"(objectClass=*)",array("cn","description","uid"));
$computers_intitul=array(_("Description").":",_("UID").":");
//data about servers
- $servers= $ldap->gen_xls(get_ou("servgeneric", "serverRDN") .$dn,"(objectClass=*)",array("cn"));
+ $servers= $ldap->gen_xls(get_ou('serverRDN').$dn,"(objectClass=*)",array("cn"));
$servers_intitul=array(_("Name").":");
//data about addressbook
$address= $ldap->gen_xls("dc=addressbook,".$dn,"(objectClass=*)",
diff --git a/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc b/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc
index ba2ef6c4ab6444847a6c5ae77abb267fdf8a98b8..89820d9e22fa08473f499bbc11272bcb4365f585 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("core", "groupRDN") , get_ou("core", "userRDN") );
+ $this->storagePoints = array(get_ou("userRDN"), get_ou('groupRDN'));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index 51b2bbf2fb4840ae343fabf97d9185c1aeea4e65..b79e29d80d7c94316861e08958d3fba8ac663246 100644 (file)
foreach($res as $entry){
if(!isset($entry['MAC'][0]['VALUE'])) $entry['MAC'][0]['VALUE'] = "";
$obj = array(
- "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("wingeneric", "sambaMachineAccountRDN") .$this->config->current['BASE'],
+ "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("sambaMachineAccountRDN").$this->config->current['BASE'],
"objectClass" => array("gosa_opsi_client"),
"cn" => array(0 => $entry['NAME'][0]['VALUE']),
"macAddress" => array(0 => $entry['MAC'][0]['VALUE']),
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc
index 1f2c76ff982dd50a058c41f2f692a7395313a51e..d2f9487b768b9e38c9050de67da7d3db9968b375 100644 (file)
$ui = get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
} else {
- $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleGeneric", "roleRDN") , '/i')."/","",$this->dn);
+ $this->base= preg_replace("/^[^,]+,".preg_quote(get_ou("roleRDN"), '/i')."/","",$this->dn);
}
// Keep track of naming attribute modifications
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc b/gosa-plugins/rolemanagement/admin/roleManagement/class_roleManagement.inc
index 7aa0defd2e89298521bbd8658c43eee10a092094..38d45e7aa413cfa502846df4d2e7d82fa1c32f80 100644 (file)
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("roleGeneric", "roleRDN") );
+ $this->storagePoints = array(get_ou("roleRDN"));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc b/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc
index 24b95e74473b06dbc9d926de7de821582fce7830..5ab586cf633f2cfdf55a4a7ba3dabb35a428e3ef 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleGeneric", "roleRDN") .$baseobject->base;
+ $new_dn= 'cn='.$baseobject->cn.','.get_ou("roleRDN").$baseobject->base;
/* Move role? */
if ($this->dn != $new_dn){
diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
index ce697a00692d18a669906307ece6e3c9daae62dc..1ba789d10e3eb8693e0483aeee75290ba8fe302c 100644 (file)
$ui = get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
- } elseif(preg_match("/".preg_quote(get_ou("wingeneric", "sambaMachineAccountRDN") , '/')."/i", $this->dn)){
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("wingeneric", "sambaMachineAccountRDN") , '/')."/i", "", $this->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
} else {
$this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou(), '/')."/i", "", $this->dn);
}
/* Call common method to give check the hook */
$message= plugin::check();
$message= array_merge($message, $this->netConfigDNS->check());
- $this->dn= "cn=".$this->uid.",".get_ou("wingeneric", "sambaMachineAccountRDN") .$this->base;
+ $this->dn= "cn=".$this->uid.",".get_ou('sambaMachineAccountRDN').$this->base;
if(!$this->acl_is_createable()){
$message[]= msgPool::permCreate();
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 24e614dbbd4485b6d29350071c46c01b27779203..209b14fca746c7e8de51080e52e72219c4f1c72e 100644 (file)
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentGeneric", "componentRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"), '/')."/i", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
/* Save dn for later references */
$message= plugin::check();
$message= array_merge($message,$this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou("componentGeneric", "componentRDN") .$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('componentRDN').$this->base;
if ($this->cn == "" ){
$message[]= msgPool::required(_("Component name"));
if(preg_match("/cn=dhcp,/",$attrs['dn'])){
continue;
}
- if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentGeneric", "componentRDN") , '/')."/i",$attrs['dn'])){
+ if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"), '/')."/i",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Component name"));
break;
}
diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
index f20158e1305b08920dff079699296daf7d01d7a1..d794cc807424ed315f00d06e2ea689428d6b2850 100644 (file)
foreach($entries as $key => $entry){
- if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") ,'/')."/i", $entry['dn'])){
+ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){
// Detect incoming types
if(in_array('gotoWorkstation', $entry['objectClass'])){
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index 1c6ac0c291a4b0885965a16b79f185bf0ef0ee85..d8891da71c6f4c9143e83e24466de7270bfc34fe 100644 (file)
$ui= get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
- } elseif(preg_match("/".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", $this->dn)){
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/i", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
/* Call common method to give check the hook */
$message= plugin::check();
$message= array_merge($message, $this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou("servgeneric", "serverRDN") .$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou('serverRDN').$this->base;
/* must: cn */
if ($this->cn == ""){
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$attrs['dn'])){
+ if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou('serverRDN'), '/')."/i",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Server name"));
break;
}
}
/* Warn the user, that this host is currently installing */
- if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$this->orig_dn)){
+ if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
/* Force aborting without message dialog */
$message[] = "";
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 5c2c7887c207e4d6b60b9660c185468224d17d3a..d6934e9e2507e86073ba72418f22c5d5560d00f7 100644 (file)
*/
static function incomingFilterConverter($filter)
{
- $rdn = preg_replace("/^[^=]*=/", "", get_ou("group", "ogroupRDN") );
+ $rdn = preg_replace("/^[^=]*=/", "", get_ou('systemIncomingRDN'));
$rdn = preg_replace("/,.*$/","",$rdn);
return(preg_replace("/%systemIncomingRDN/", $rdn,$filter));
}
$data['OG'], "<b>Selected ogroup:</b>");
if($data['OG'] != "none"){
- $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN") , '/')."/i", "", $data['OG']);
+ $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou('ogroupRDN'), '/')."/i", "", $data['OG']);
$this->tabObject->by_object[$plugClass]->baseSelector->setBase($this->tabObject->base);
} else {
$this->tabObject->by_object[$plugClass]->baseSelector->setBase($headpage->getBase());
"aclCategory" => "opsi"),
"goServer" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('serverRDN'),
"plugClass" => "servgeneric",
"tabClass" => "servtabs",
"tabDesc" => "SERVTABS",
"aclCategory" => "server"),
"gotoWorkstation" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('workstationRDN'),
"plugClass" => "workgeneric",
"tabClass" => "worktabs",
"tabDesc" => "WORKTABS",
"aclCategory" => "workstation"),
"gotoTerminal" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('terminalRDN'),
"plugClass" => "termgeneric",
"tabClass" => "termtabs",
"sendEvents" => TRUE,
"aclCategory" => "terminal"),
"gotoPrinter" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('printerRDN'),
"plugClass" => "printgeneric",
"tabClass" => "printtabs",
"tabDesc" => "PRINTTABS",
"aclCategory" => "printer"),
"FAKE_OC_NewDevice" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('systemIncomingRDN'),
"plugClass" => "termgeneric",
"tabClass" => "termtabs",
"sendEvents" => TRUE,
"aclCategory" => "terminal"),
"goFonHardware" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('phoneRDN'),
"plugClass" => "phoneGeneric",
"tabClass" => "phonetabs",
"tabDesc" => "PHONETABS",
"aclCategory" => "winworkstation"),
"ieee802Device" => array(
- "ou" => get_ou("group", "ogroupRDN") ,
+ "ou" => get_ou('componentRDN'),
"plugClass" => "componentGeneric",
"sendEvents" => FALSE,
"tabClass" => "componenttabs",
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index b12a4ef586e0b9ca0d04cbec4bc8c8f4be0f665e..dc37a189764298d1204f79dda65bfe547c31b61e 100644 (file)
over the whole ldap server was 10 to 20 times slower.
*/
$deps = array();
- $ou = preg_replace("/,.*$/","",get_ou("servgeneric", "serverRDN") );
- $a_ous = array(get_ou("servgeneric", "serverRDN") ,
- get_ou("servgeneric", "serverRDN") ,
- get_ou("servgeneric", "serverRDN") ,
- get_ou("servgeneric", "serverRDN") ,
- get_ou("servgeneric", "serverRDN") ,
- get_ou("servgeneric", "serverRDN") );
+ $ou = preg_replace("/,.*$/","",get_ou("systemRDN"));
+ $a_ous = array(get_ou("serverRDN"),
+ get_ou("terminalRDN"),
+ get_ou("workstationRDN"),
+ get_ou("printerRDN"),
+ get_ou("phoneRDN"),
+ get_ou("componentRDN"));
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
diff --git a/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc
index 514767832ec4e3105f78c4e232666ec1232958f8..c46ce62863705d28a5d6484e6b0035d02fbd1d8f 100644 (file)
{
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") );
+ $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('terminalRDN'));
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/systems/admin/systems/tabs_component.inc b/gosa-plugins/systems/admin/systems/tabs_component.inc
index 7a227af14b74e31b89b5866bbeccf7401d23cab5..5dfc787ccf7b029404c4fe6163534fee7559b9b5 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['componentGeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou("componentGeneric", "componentRDN") .$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou('componentRDN').$baseobject->base;
if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc
index 4435c6cfb262da4417ae636a4b43e8e451f30533..ea977581a05597e6bf26fc7f8819b7873ffab1d4 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['servgeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou("servgeneric", "serverRDN") .$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou('serverRDN').$baseobject->base;
/* cn is not case sensitive for ldap, but for php it is!! */
if($baseobject->orig_dn != "new"){