Code

Fixed undefined index in class environment.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Nov 2007 11:59:05 +0000 (11:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 19 Nov 2007 11:59:05 +0000 (11:59 +0000)
Fixed smarty errors in dhcp classes

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7812 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_dhcpAdvanced.inc
plugins/admin/systems/class_dhcpHost.inc
plugins/admin/systems/class_dhcpNetwork.inc
plugins/personal/environment/class_environment.inc

index 4e2cae5daabea7f2734529d6352551b71705780a..43f5831528a88f96b3a9ca1905cf4a2238d3e4bc 100644 (file)
@@ -93,7 +93,7 @@ class dhcpAdvanced extends plugin
 
     /* Show main page */
     $smarty->assign("show_advanced", $this->show_advanced);
-    return ($smarty->fetch (get_template_path('dhcp_advanced.tpl', TRUE)));
+    return ($smarty->fetch (get_template_path('dhcp_advanced.tpl', TRUE,dirname(__FILE__))));
   }
 
   function remove_from_parent()
index 610eadc6e69669ea94df2d17cd537eb53922aeac..e8aab5c950b690ff5168734b9808ba66bf899f6e 100644 (file)
@@ -63,7 +63,7 @@ class dhcpHost extends dhcpPlugin
           "fddi" => _("FDDI"),
           "token-ring" => _("Token Ring")));
     /* Show main page */
-    $display= $smarty->fetch(get_template_path('dhcp_host.tpl', TRUE)).$this->network->execute();
+    $display= $smarty->fetch(get_template_path('dhcp_host.tpl', TRUE,dirname(__FILE__))).$this->network->execute();
 
     /* Merge arrays for advanced view */
     $this->fix_options();
index fc73234e4123a3acd154493938d125526d03c342..1c3ced0659a0a533cf6a1f35d92b19e046b6fe14 100644 (file)
@@ -136,7 +136,7 @@ class dhcpNetwork extends plugin
       }
     }
 
-    return $smarty->fetch(get_template_path('dhcp_network.tpl', TRUE));
+    return $smarty->fetch(get_template_path('dhcp_network.tpl', TRUE,dirname(__FILE__)));
   }
 
   function remove_from_parent()
index 973edcc825b20debfd7c0f6ae5279bfb8d8f410e..8830c41919467fb43d9b3da84f5ed5dabf4e2082 100644 (file)
@@ -308,7 +308,7 @@ class environment extends plugin
     /* Log view */
     if($this->is_account && !$this->view_logged){
       $this->view_logged = TRUE;
-      if(isset($this->parent->by_object['user']) || in_array("gosaAccount",$this->attrs['objectClass'])){
+      if(isset($this->parent->by_object['user']) || (isset($this->attrs['objectClass']) &&in_array("gosaAccount",$this->attrs['objectClass']))){
         new log("view","users/".get_class($this),$this->dn);
       }else{
         new log("view","groups/".get_class($this),$this->dn);
@@ -826,8 +826,9 @@ class environment extends plugin
           $type = false;
 
           if($this->is_group){
-
-            if(isset($this->NewDeletedPrinters[$pname])){
+            if($this->dn == "new"){  
+              $type = "AddGroup";
+            }elseif(isset($this->NewDeletedPrinters[$pname])){
               $type = "AddGroup";
             }elseif($printerObj->by_object['printgeneric']->AddMember("AddGroup",$this->dn)){
               $type = "AddGroup";