@@ -557,7 +558,7 @@
// add colum prefix 'cal_' if there's not already a 'recur_' prefix
foreach($event as $col => $val)
{
- if ($col[0] != '#' && substr($col,0,6) != 'recur_' && $col != 'alarm')
+ if ($col[0] != '#' && substr($col,0,6) != 'recur_' && $col != 'alarm' && $col != 'tz_id')
{
$event['cal_'.$col] = $val;
unset($event[$col]);
@@ -702,7 +703,7 @@
// update start- and endtime if present in the event-array, evtl. we need to move all recurrences
if (isset($event['cal_start']) && isset($event['cal_end']))
{
- $this->move($cal_id,$event['cal_start'],$event['cal_end'],!$cal_id ? false : $change_since);
+ $this->move($cal_id,$event['cal_start'],$event['cal_end'],$event['tz_id'],!$cal_id ? false : $change_since);
}
// update participants if present in the event-array
if (isset($event['cal_participants']))
@@ -771,12 +772,14 @@
* @param int $cal_id
* @param int $start new starttime
* @param int $end new endtime
+ * @param int $tz_id timezone id to set
* @param int|boolean $change_since=0 false=new entry, > 0 time from which on the repetitions should be changed, default 0=all
* @param int $old_start=0 old starttime or (default) 0, to query it from the db
* @param int $old_end=0 old starttime or (default) 0
+ * @todo Recalculate recurrences, if timezone changes
* @return int|boolean number of moved recurrences or false on error
*/
- function move($cal_id,$start,$end,$change_since=0,$old_start=0,$old_end=0)
+ function move($cal_id,$start,$end,$tz_id,$change_since=0,$old_start=0,$old_end=0)
{
//echo "<p>socal::move($cal_id,$start,$end,$change_since,$old_start,$old_end)</p>\n";
return 1;
@@ -816,7 +820,7 @@
if ($move_start || $move_end)
{
// move the event and it's recurrences
- $this->db->query("UPDATE $this->dates_table SET cal_start=cal_start+$move_start,cal_end=cal_end+$move_end WHERE $where".
+ $this->db->query("UPDATE $this->dates_table SET cal_start=cal_start+$move_start,cal_end=cal_end+$move_end,tz_id=".(int)$tz_id." WHERE $where".
((int) $change_since ? ' AND cal_start >= '.(int) $change_since : ''),__LINE__,__FILE__);
}
return $this->db->affected_rows();
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@... https://lists.sourceforge.net/lists/listinfo/egroupware-cvs