From 60c04ebe5291f28785d70c528a989e3b020d3b22 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 19 Feb 2010 09:00:43 +0000 Subject: [PATCH] Updated incoming-object activation, detect current base correctly git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15652 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/class_terminalGeneric.inc | 2 ++ .../goto/admin/systems/goto/class_workstationGeneric.inc | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index 7273fada3..9d17bb50b 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -128,6 +128,8 @@ class termgeneric extends plugin if ($this->dn == "new"){ $ui= get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); + } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){ + $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn); } else { $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 9ade8d06d..47369ae9a 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -144,7 +144,9 @@ class workgeneric extends plugin if ($this->dn == "new"){ $ui= get_userinfo(); $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn); - } else { + } 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("workstationRDN"), '/')."/i", "", $this->dn); } -- 2.30.2