doesnt handle end dates or node references
der - February 15, 2008 - 20:28
| Project: | VCalfield |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
There is a bug in this module that ignores end dates in certain situations. Also, if one of the vcal fields sources is a node reference no value gets populated in the resulting ical file. I didnt have time to create a patch but the following code resolves these two issues. It's the "default" case in the vcalfield_file() function.
default:
if ($key){
$fd = $node->$key;
if ($field == 'end'){
if ($fields['end'] == $fields['start']){
$rfields[$field] = $fd['0']['value2'];
} else {
$rfields[$field] = $fd['0']['value'];
}
} else {
if ($fd['0']['nid']) {
$temp_node = node_load(array('nid' => $fd['0']['nid']));
$rfields[$field] = $temp_node->title;
} else {
$rfields[$field] = $fd['0']['value'];
}
}
}
break;