Code

Updated class plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 07:06:38 +0000 (07:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Mar 2008 07:06:38 +0000 (07:06 +0000)
-saved_attributes was not created correctly for array values. Only the first array entry was used

{{{
$this->attrs['gotoLdapServer'][0]="0:ldap://server1";
                              [1] "1:ldap://server2";
}}}

Results in
{{{
$this->attrs['gotoLdapServer']="0:ldap://server1";
}}}

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10051 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc

index 2bd31a5e33f6829c5b6880509fe3bb8f64162807..c852f48bf4c903b7b28303a4a3a6ce56f80d91eb 100644 (file)
@@ -215,7 +215,7 @@ class plugin
           unset($this->saved_attributes[$index]);
           continue;
         }
-        if (isset($this->saved_attributes[$index][0]) || $this->saved_attributes[$index]["count"] == 1){
+        if (isset($this->saved_attributes[$index][0]) && $this->saved_attributes[$index]["count"] == 1){
           $tmp= $this->saved_attributes[$index][0];
           unset($this->saved_attributes[$index]);
           $this->saved_attributes[$index]= $tmp;