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:47:54 +0000 (08:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Nov 2010 08:47:54 +0000 (08:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20333 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc

index c8e6c075b2f9cef6ff4da70df0d52813b52d35d3..3fc50f4fdb98777ecbd4e2eb84d2e939c6f072a6 100644 (file)
@@ -104,7 +104,8 @@ class printgeneric extends plugin
         } else {
 
             /* Set base and check if the extracted base exists */
-            if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->dn)){
+            if(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","",dn2base($this->dn));
             }else{
                 $this->base= preg_replace("/".preg_quote(get_ou("printgeneric", "printerRDN"), '/')."/i","",dn2base($this->dn));
@@ -921,7 +922,8 @@ class printgeneric extends plugin
         }
 
         /* Ensure to create a new object */
-        if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
+        if(class_available("ArpNewDevice") &&
+                preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN"), '/')."/i",$this->orig_dn)){
             $this->orig_dn = "new";
         }