From f05ef0ea625c44e7c27e5ae445080ff5ffaa2fbc Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Oct 2008 12:55:15 +0000 Subject: [PATCH] Updated gophoneHardware -Updated check(); macAddress is must git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12756 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/admin/systems/gofon/class_phoneGeneric.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc index 41072b938..f40e3cb71 100644 --- a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc +++ b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc @@ -55,6 +55,7 @@ class phoneGeneric extends plugin { plugin::plugin ($config, $dn, $parent); $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true); + $this->netConfigDNS->MACisMust =TRUE; /* Set base */ if ($this->dn == "new"){ @@ -423,6 +424,9 @@ class phoneGeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); + if (!$ldap->success()){ + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + } new log("create","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } else { @@ -434,6 +438,9 @@ class phoneGeneric extends plugin $this->cleanup(); $ldap->modify ($this->attrs); new log("modify","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + if (!$ldap->success()){ + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class())); + } // $user_phone_reload $ldap->cd ($this->config->current['BASE']); -- 2.30.2