From 3c1bce87328c1c6cfa54a096cf44697fb98994de Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 20 Jun 2005 09:39:59 +0000 Subject: [PATCH] Fixed array loading which was broken git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@756 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servService.inc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc index 5343f155d..444df8cf0 100644 --- a/plugins/admin/systems/class_servService.inc +++ b/plugins/admin/systems/class_servService.inc @@ -42,12 +42,13 @@ class servservice extends plugin /* Load arrays */ foreach (array("goTimeSource", "goExportEntry") as $name){ - $this->$name= array(); + $tmp= array(); if (isset($this->attrs[$name])){ for ($i= 0; $i<$this->attrs[$name]['count']; $i++){ - $this->$name[$this->attrs[$name][$i]]= $this->attrs[$name][$i]; + $tmp[$this->attrs[$name][$i]]= $this->attrs[$name][$i]; } } + $this->$name= $tmp; } /* Always is account... */ @@ -177,7 +178,6 @@ class servservice extends plugin /* Save to LDAP */ function save() { - /* Normalize lazy objectclass arrays */ $objectclasses= array(); foreach($this->objectclasses as $oc){ @@ -199,6 +199,14 @@ class servservice extends plugin } } + /* Arrays */ + foreach (array("goTimeSource", "goExportEntry") as $name){ + $this->attrs[$name]= array(); + foreach ($this->$name as $element){ + $this->attrs[$name][]= $element; + } + } + /* Write to LDAP */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); -- 2.30.2