From 3fe7324c9acd1de420e971f9f61a8b839ce639ce Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 19 Nov 2007 11:59:05 +0000 Subject: [PATCH] Fixed undefined index in class environment. 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 | 2 +- plugins/admin/systems/class_dhcpHost.inc | 2 +- plugins/admin/systems/class_dhcpNetwork.inc | 2 +- plugins/personal/environment/class_environment.inc | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/admin/systems/class_dhcpAdvanced.inc b/plugins/admin/systems/class_dhcpAdvanced.inc index 4e2cae5da..43f583152 100644 --- a/plugins/admin/systems/class_dhcpAdvanced.inc +++ b/plugins/admin/systems/class_dhcpAdvanced.inc @@ -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() diff --git a/plugins/admin/systems/class_dhcpHost.inc b/plugins/admin/systems/class_dhcpHost.inc index 610eadc6e..e8aab5c95 100644 --- a/plugins/admin/systems/class_dhcpHost.inc +++ b/plugins/admin/systems/class_dhcpHost.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpNetwork.inc b/plugins/admin/systems/class_dhcpNetwork.inc index fc73234e4..1c3ced065 100644 --- a/plugins/admin/systems/class_dhcpNetwork.inc +++ b/plugins/admin/systems/class_dhcpNetwork.inc @@ -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() diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 973edcc82..8830c4191 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -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"; -- 2.30.2