summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-09-11 09:45:43 +0200
committerAleksander Machniak <alec@alec.pl>2013-09-11 09:45:43 +0200
commit7bd9dcdcda53ce93e03d24bf7218e1cf61772894 (patch)
tree4b46e0a0c73b862677a6a3568b74638fa2f7a993 /program/steps
parent66a549e1331fb85a04d34294b1197e6848a76954 (diff)
parent52830ea6056dc85d8ffcb0cfb7ead7d70624e109 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/addressbook/save.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 1628f5b0f..2adc53bcf 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -77,6 +77,16 @@ foreach ($GLOBALS['CONTACT_COLTYPES'] as $col => $colprop) {
}
else if (isset($_POST[$fname])) {
$a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST, true);
+
+ // normalize the submitted date strings
+ if ($colprop['type'] == 'date') {
+ if ($timestamp = rcube_utils::strtotime($a_record[$col])) {
+ $a_record[$col] = date('Y-m-d', $timestamp);
+ }
+ else {
+ unset($a_record[$col]);
+ }
+ }
}
}