- LSattr_ldap_date : Gestion du cas paticulier du stockage d'un timestamp UNIX.

This commit is contained in:
Benjamin Renard 2008-12-05 17:32:42 +00:00
parent 467510201e
commit ca48658a32

View file

@ -37,6 +37,9 @@ class LSattr_ldap_date extends LSattr_ldap {
if(!is_array($data)) { if(!is_array($data)) {
$data=array($data); $data=array($data);
} }
if ($this -> config['ldap_options']['timestamp']==1) {
return $data;
}
$retval=array(); $retval=array();
foreach($data as $val) { foreach($data as $val) {
$date = strptime($val,$this -> getFormat()); $date = strptime($val,$this -> getFormat());
@ -55,6 +58,9 @@ class LSattr_ldap_date extends LSattr_ldap {
* @retval mixed La valeur traitée de l'attribut * @retval mixed La valeur traitée de l'attribut
*/ */
function getUpdateData($data) { function getUpdateData($data) {
if ($this -> config['ldap_options']['timestamp']==1) {
return $data;
}
$retval=array(); $retval=array();
if(is_array($data)) { if(is_array($data)) {
foreach($data as $val) { foreach($data as $val) {