mediawiki-extensions / mw-calendar

Automatically exported from code.google.com/p/mw-calendar
0 stars 2 forks source link

Repeating Events #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi I'm using Mediawiki 1.13.3 an installed your calendar extension (version
v3.7.7.1 (5/6/2009)).

I found a little bug when using repeating events.

Here's my testcase:

- create an event on June 15 and repeat it 30 days. <- this will work
- create an event on June 14 and repeat it 30 days. <- this will repeat the
event until June 30, but not to until July 13.

It seems this bug produced through the function renderCalendar in
Calendar.php somewhere around line 196 to 200.

196 //grab last months events for overlapped repeating events
197 if($this->setting('enablerepeatevents'))
198   $this->initalizeMonth($this->day +15, 0); // this checks 1/2 way into
the previous month
199 else
200   $this->initalizeMonth($this->day, 0); // just go back to the 1st of
the current month

I'm not really good code with PHP so I played a little with line 198. I
just increased the 15 to 60. This allows me to set up repeating events over
60 days. Every value above will not work.

I hope this helps.

Greetz

Stefan

Original issue reported on code.google.com by osikt...@googlemail.com on 18 Jun 2009 at 3:38

GoogleCodeExporter commented 8 years ago
It seems this is purposely built into the code, as the ReadMe documentation 
states 

"Repeating events are created using using (5# Vacation) within normal events. 
The
code looks up the previous months and applies carry-over events to the current 
month.
It may increase the calendar load time as it looks back 15 days into the 
previous
month for carry over repeating events."

I presume increasing this number, especially on quite busy calendars, may 
increase
load times to unacceptable / timeout levels.

Original comment by ev.delen...@gmail.com on 6 Jul 2009 at 6:15

GoogleCodeExporter commented 8 years ago
It is currently hardcoded as user "ev.delen.work" states because of 
performance. The
repeating logic is very slow because its all wiki code based, not SQL based. 
I've
played with a few options, but there really isnt a great way to do it without 
making
the calendar talk to MediaWiki at the SQL level. 

Once I get some time, I'll see what I can do to improve this more.

Thanks
Eric

Original comment by kenyu73 on 6 Jul 2009 at 6:39

GoogleCodeExporter commented 8 years ago
updated the code in 3.7.8

It defaults 1/2 (15 days) into the previous month. I added an option 
to 'enablerepearevents=<number>' to override the default.

Original comment by kenyu73 on 4 Aug 2009 at 10:38