From d683c2c7e13258a6093a0442cc272131723c7142 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 20 May 2007 15:14:39 +0000 Subject: [PATCH] "Fix for not working birthdays in xmlrpc as reported on the users-list" --- addressbook/inc/class.boaddressbook.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.boaddressbook.inc.php b/addressbook/inc/class.boaddressbook.inc.php index c282c8621c..5dc2abd136 100644 --- a/addressbook/inc/class.boaddressbook.inc.php +++ b/addressbook/inc/class.boaddressbook.inc.php @@ -193,9 +193,11 @@ class boaddressbook $data = array_diff($data,array('',null)); // translate birthday to a iso8601 date - if(isset($data['bday'])) + if(isset($data['bday']) && $data['bday']) { + $y = $m = $d = null; list($y,$m,$d) = explode('-',$data['bday']); + if (is_null($d)) list($m,$d,$y) = explode('/',$data['bday']); $data['bday'] = $GLOBALS['server']->date2iso8601(array('year'=>$y,'month'=>$m,'mday'=>$d)); } // translate timestamps