End Date not saved properly for existing nodes
ambereyes - July 6, 2008 - 01:02
| Project: | Event Repeat |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
I noticed that often when I edit a node in a repeat sequence, the ending time gets hosed up somehow in all of the nodes. So I was scanning the code and noticed that the start hour, minute and second gets saved, but not the ending hour, minute and second in the _eventrepeat_save_repat function starting at about line 1556.
So my question is this, is there a reason we are not saving the ending time along with the date?
//loop through the new sequence, mapping the start/end dates
//from the old sequence to the new pattern
while (($new_date = db_fetch_object($update_render_dates)) && ($old_date = db_fetch_object($old_render_dates))) {
//here we generate new start and end timestamps for the node,
//based on present new render sequence and the start and end
//time of the node from which the edit is being performed,
//accounting for timezone offsets
$start_time = event_explode_date($new_date->date);
$start_time['hour'] = $start['hour'];
$start_time['minute'] = $start['minute'];
$start_time['second'] = $start['second'];
$end_time = event_implode_date(event_date_later($start_time, event_duration($start, event_explode_date($node->event['end_orig']))));
$start_time = event_implode_date($start_time);
//update the event start and end time TODO: event times are
//getting adjusted here (possible cause of double shift)
db_query("UPDATE {event} SET event_start = '%s', event_end = '%s' WHERE nid = %d", $start_time, $end_time, $old_date->nid);
$last_rendered = $new_date->date;
}
#1
OK. Need to see if that is still true.
Thanks
Robert