From: cajus Date: Mon, 20 Jun 2005 09:39:59 +0000 (+0000) Subject: Fixed array loading which was broken X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3c1bce87328c1c6cfa54a096cf44697fb98994de;p=gosa.git Fixed array loading which was broken git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@756 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);