merged carsten's changes from the 1.0 branch

and fixed bug [ 1011704 ] Division by zero error
This commit is contained in:
Ralf Becker 2004-08-19 10:29:57 +00:00
parent 77cce9e9dc
commit b144f0ffad

View File

@ -146,6 +146,13 @@
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
$this->jscal = &$GLOBALS['phpgw']->jscalendar;
if(!isset($this->bo->prefs['calendar']['interval']))
{
$this->bo->prefs['calendar']['interval'] = 30;
$GLOBALS['phpgw']->preferences->add('calendar','interval',30);
$GLOBALS['phpgw']->preferences->save_repository();
}
}
/* Public functions */
@ -751,6 +758,10 @@
echo '<center>'.lang('Sorry, this event does not exist').'.'.'</center>'."\n";
$GLOBALS['phpgw']->common->phpgw_exit(True);
}
if(isset($event['description']))
{
$event['description'] = str_replace(array("\n","\r"),array('<br/>',''),$event['description']);
}
$this->bo->repeating_events = Array();
$this->bo->cached_events = Array();
@ -3752,12 +3763,6 @@ return;
}
uasort($participants,'strnatcasecmp'); // sort them after their fullname
if(!isset($this->bo->prefs['calendar']['interval']))
{
$this->bo->prefs['calendar']['interval'] = 15;
$GLOBALS['phpgw']->preferences->add('calendar','interval',15);
$GLOBALS['phpgw']->preferences->save_repository();
}
$increment = $this->bo->prefs['calendar']['interval'];
$interval = (int)(60 / $increment);
$colspan = $this->bo->prefs['calendar']['workdayends'] - $this->bo->prefs['calendar']['workdaystarts'];