function spaces_calendar_event_submit in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_calendar/spaces_calendar.module \spaces_calendar_event_submit()
File
- spaces_calendar/
spaces_calendar.module, line 223
Code
function spaces_calendar_event_submit($form_id, $form_values) {
$n = node_submit($form_values);
if ($date = $n->field_date[0]['value']) {
$date = strtotime($date);
$m = format_date($date, 'custom', 'm');
$y = format_date($date, 'custom', 'Y');
return "calendar/{$y}/{$m}";
}
}