Fix for bug #413848, #414865 - Repeating Weekly events

This commit is contained in:
skeeter 2001-04-14 02:57:51 +00:00
parent 68c78fc532
commit 6fb2941327
3 changed files with 11 additions and 9 deletions

View File

@ -128,6 +128,8 @@
$recur_enddate[mday] = 0;
}
$recur_data = $cal[rpt_sun] + $cal[rpt_mon] + $cal[rpt_tue] + $cal[rpt_wed] + $cal[rpt_thu] + $cal[rpt_fri] + $cal[rpt_sat];
switch($recur_type)
{
case RECUR_NONE:

View File

@ -1620,31 +1620,31 @@ class calendar extends calendar_
if($event->recur_type == RECUR_WEEKLY || $event->recur_type == RECUR_DAILY)
{
$repeat_days = '';
if ($event->recur_data & M_SUNDAY)
if (!!($event->recur_data & M_SUNDAY) == True)
{
$this->view_add_day(lang('Sunday '),$repeat_days);
}
if ($event->recur_data & M_MONDAY)
if (!!($event->recur_data & M_MONDAY) == True)
{
$this->view_add_day(lang('Monday '),$repeat_days);
}
if ($event->recur_data & M_TUESDAY)
if (!!($event->recur_data & M_TUESDAY) == True)
{
$this->view_add_day(lang('Tuesay '),$repeat_days);
}
if ($event->recur_data & M_WEDNESDAY)
if (!!($event->recur_data & M_WEDNESDAY) == True)
{
$this->view_add_day(lang('Wednesday '),$repeat_days);
}
if ($event->recur_data & M_THURSDAY)
if (!!($event->recur_data & M_THURSDAY) == True)
{
$this->view_add_day(lang('Thursday '),$repeat_days);
}
if ($event->recur_data & M_FRIDAY)
if (!!($event->recur_data & M_FRIDAY) == True)
{
$this->view_add_day(lang('Friday '),$repeat_days);
}
if ($event->recur_data & M_SATURDAY)
if (!!($event->recur_data & M_SATURDAY) == True)
{
$this->view_add_day(lang('Saturday '),$repeat_days);
}

View File

@ -339,7 +339,7 @@ class calendar_ extends calendar__
//$this->event->recur_data = $this->stream->f('recur_data');
// But until then, do it this way...
//Legacy Support
$rpt_days = strtoupper($this->stream->f('cal_rpt_days'));
$rpt_days = strtoupper($this->stream->f('cal_days'));
$this->event->rpt_days = $rpt_days;
$this->event->rpt_sun = (substr($rpt_days,0,1)=='Y'?1:0);
$this->event->rpt_mon = (substr($rpt_days,1,1)=='Y'?1:0);
@ -350,7 +350,7 @@ class calendar_ extends calendar__
$this->event->rpt_sat = (substr($rpt_days,6,1)=='Y'?1:0);
//Legacy Support (New)
$rpt_days = strtoupper($this->stream->f('cal_rpt_days'));
$rpt_days = strtoupper($this->stream->f('cal_days'));
$this->event->recur_data = 0;
$this->event->recur_data += (substr($rpt_days,0,1)=='Y'?M_SUNDAY:0);
$this->event->recur_data += (substr($rpt_days,1,1)=='Y'?M_MONDAY:0);