Code

Updated ARP dependencies! If ArpNewDevice wasn t avaiable, some plugins were broken.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Nov 2010 08:48:04 +0000 (08:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Nov 2010 08:48:04 +0000 (08:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20336 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc

index 49ce7b07353f31ed4b2dcd8044d0256a2e4de1ee..a585d0d03ce8820881ff854566e7df3bb0b446f7 100644 (file)
@@ -59,7 +59,8 @@ class wingeneric extends plugin
       $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("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_winstations_ou(), '/')."/i", "", $this->dn);