From: hickert Date: Thu, 18 Dec 2008 10:27:57 +0000 (+0000) Subject: Updated New Device && opsi host X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a4a0b280fb17abb0861596cb6720f6b5b01aa71e;p=gosa.git Updated New Device && opsi host git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc b/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc index e988fcca3..09e41147c 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_SelectDeviceType.inc @@ -75,8 +75,6 @@ class SelectDeviceType extends plugin /* Save data to object */ function save_object() { - - echo "Calleed"; plugin::save_object(); foreach($this->attributes as $attr){ if(isset($_POST[$attr])){ diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc index 5f150b223..911507fac 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc @@ -30,7 +30,7 @@ class opsiGeneric extends plugin private $opsi; // The opsi handle public $parent = NULL; // The parent object (in case of samba) - private $hostId = ""; // The host Id of the currently edit opsi host + public $hostId = ""; // The host Id of the currently edit opsi host public $mac = ""; // The hosts mac address public $note = ""; // A note public $description = ""; // The client description diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 08a1d6aea..e6423173c 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -370,6 +370,19 @@ class systems extends plugin */ $this->systab->was_activated = TRUE; + /* Assign some default values for opsi hosts + */ + if($this->systab instanceOf opsi_tabs){ + $ldap = $this->config->get_ldap_link(); + $ldap->cat($dn); + $source_attrs = $ldap->fetch(); + foreach(array("macAddress" => "mac" ,"cn" => "hostId","description","description") as $src => $attr){ + if(isset($source_attrs[$src][0])){ + $this->systab->by_object['opsiGeneric']->$attr = $source_attrs[$src][0]; + } + } + } + if($selected_group != "none"){ /*******