From f800cf5374e9e0eb61c9d209a7114629606a0b6b Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 10 Nov 2006 13:01:10 +0000 Subject: [PATCH] Fixed nagios attribute problem. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5073 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/netatalk/class_netatalk.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc index 9475f4d4b..57edb1464 100644 --- a/plugins/personal/netatalk/class_netatalk.inc +++ b/plugins/personal/netatalk/class_netatalk.inc @@ -181,7 +181,7 @@ class netatalk extends plugin { if (!($obj->is_account) ) { $errmsg.="Posix features are needed for netatalk accounts, enable them first. "; } - if ($ldap->count() == 0) { + if (count($this->shares)== 0) { $errmsg.="At least one share with netatalk or NFS mount entry needed."; } if($errmsg==""){ @@ -253,8 +253,13 @@ class netatalk extends plugin { $ldap = $this->config->get_ldap_link(); - /* Call parents save to prepare $this->attrs */ + /* Reset array of used attributes, because plugin::save() + will not work with '-' in attributes names + after calling save restore attributes array */ + $attributes = $this->attributes; + $this->attributes = array(); plugin :: save(); + $this->attributes = $attributes; /* Do attribute conversion */ foreach ($this->attributes as $val) { -- 2.30.2