mediawiki-extensions / mw-calendar

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

summary/description loop problem (iCal import) #103

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Wiki Version: 1.15
Calendar Version: 3.8.4

Problem:
I'm importing an iCal calendar. I have two events, one with a summary and a
description, the second only with a summary. Both events in the wiki get
the description of the first event.

The reason is in the load_iCal method (file Calendar.php), in the foreach
loop. The variables for summary and description are only filled from the
event variable if there is something set on the event, but their values
from the previous loop aren't overwritten in the other case. This should
look like this:

if (isset($event['SUMMARY'])) {
  $summary = $event['SUMMARY'];
} else {
  $summary = '';
}
if (isset($event['DESCRIPTION'])) {
  $description = $event['DESCRIPTION']; 
} else {
  $description = '';
}

Original issue reported on code.google.com by johan...@bolarus.de on 29 Sep 2009 at 12:55

GoogleCodeExporter commented 8 years ago
Thanks for the code tips. At this time I'm not doing much with iCAL. I'm 
actually
thinking of not importing iCAL anymore, but only reading from the file 
directly. 

Once I get back to iCAL stuff, I'll take a look at what you have.

Thanks again!
Eric

Original comment by kenyu73 on 10 Oct 2009 at 2:12

GoogleCodeExporter commented 8 years ago

Original comment by kenyu73 on 16 Nov 2009 at 11:14