From d8cca29286cdc2b8943ee862d1df1bc3cb203e8f Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 23 Nov 2010 08:47:58 +0000 Subject: [PATCH] Updated ARP dependencies! If ArpNewDevice wasn t avaiable, some plugins were broken. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20334 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/goto/class_terminalGeneric.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index 8024a5331..30f4bd625 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -125,7 +125,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("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ + } elseif(class_available("ArpNewDevice") && + preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $this->dn)){ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", "", $this->dn); } else { $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("termgeneric", "terminalRDN"), '/')."/i", "", $this->dn); @@ -441,7 +442,14 @@ class termgeneric extends plugin } 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())){ + + $matchArp = FALSE; + if(class_available("ArpNewDevice") && + preg_match ("/,".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i", $ldap->getDN())){ + $matchArp = TRUE; + } + + if (preg_match("/cn=dhcp,/",$attrs['dn']) || $matchArp){ continue; } else { if ($attrs['dn'] != $this->orig_dn){ -- 2.30.2