Fix to allow for saving new calendar events.

This commit is contained in:
skeeter 2001-11-18 23:01:09 +00:00
parent 5d4eb42476
commit 96f535e483
3 changed files with 43 additions and 22 deletions

View File

@ -547,6 +547,10 @@
$GLOBALS['phpgw']->common->phpgw_exit();
}
if($this->debug)
{
echo '<!-- Prior to fix_update_time() -->'."\n";
}
$this->fix_update_time($l_start);
$this->fix_update_time($l_end);
@ -709,8 +713,6 @@
}
$overlapping_events = $this->overlap(
// $this->maketime($event['start']) - $this->datetime->tz_offset,
// $this->maketime($event['end']) - $this->datetime->tz_offset,
$this->maketime($event['start']),
$this->maketime($event['end']),
$event['participants'],
@ -742,11 +744,24 @@
{
if(!$event['id'])
{
if($this->debug)
{
echo '<!-- Creating a new event. -->'."\n";
}
$this->so->cal->event = $event;
$this->so->add_entry($event);
$this->send_update(MSG_ADDED,$event['participants'],'',$this->get_cached_event());
if($this->debug)
{
echo '<!-- New event ID = '.$event['id'].' -->'."\n";
}
}
else
{
if($this->debug)
{
echo '<!-- Updating an existing event. -->'."\n";
}
$new_event = $event;
$old_event = $this->read_entry($event['id']);
$this->prepare_recipients($new_event,$old_event);

View File

@ -65,6 +65,7 @@ class socalendar__
var $users_status;
var $datetime;
var $debug = False;
// var $debug = True;
function socalendar__()
{

View File

@ -538,6 +538,11 @@ class socalendar_ extends socalendar__
$this->stream->query('DELETE FROM phpgw_cal_repeats WHERE cal_id='.$event['id'],__LINE__,__FILE__);
}
if($this->debug)
{
echo '<!-- Event ID #'.$event['id'].' saved! -->'."\n";
}
$this->stream->unlock();
return True;
}