diff --git a/trunk/includes/class/class.LSattr_ldap_boolean.php b/trunk/includes/class/class.LSattr_ldap_boolean.php index 8eca3b35..0fa8b913 100644 --- a/trunk/includes/class/class.LSattr_ldap_boolean.php +++ b/trunk/includes/class/class.LSattr_ldap_boolean.php @@ -36,7 +36,7 @@ class LSattr_ldap_boolean extends LSattr_ldap { function getDisplayValue($data) { if ($data==NULL) return; - return ($this -> isTrue($data))?1:0; + return ($this -> isTrue($data))?'yes':'no'; } /** @@ -47,7 +47,7 @@ class LSattr_ldap_boolean extends LSattr_ldap { * @retval mixed La valeur traitée de l'attribut */ function getUpdateData($data) { - if ($data[0]==1) { + if ($data[0]=='yes') { return array($this -> config['true_value']); } else { diff --git a/trunk/includes/class/class.LSformElement.php b/trunk/includes/class/class.LSformElement.php index 29fe9eaf..238a79bc 100644 --- a/trunk/includes/class/class.LSformElement.php +++ b/trunk/includes/class/class.LSformElement.php @@ -222,11 +222,14 @@ class LSformElement { return true; } if (isset($_POST[$this -> name])) { + $return[$this -> name]=array(); if(!is_array($_POST[$this -> name])) { $_POST[$this -> name] = array($_POST[$this -> name]); } foreach($_POST[$this -> name] as $key => $val) { + if (!empty($val)) { $return[$this -> name][$key] = $val; + } } return true; } diff --git a/trunk/includes/class/class.LSformElement_boolean.php b/trunk/includes/class/class.LSformElement_boolean.php index af80c6a6..3a965aa3 100644 --- a/trunk/includes/class/class.LSformElement_boolean.php +++ b/trunk/includes/class/class.LSformElement_boolean.php @@ -49,7 +49,7 @@ class LSformElement_boolean extends LSformElement { } else { foreach ($this -> values as $value) { - $return['html'] .= "