bug 369885 - View fails on repeating events with modified occurrences. Patch by Stefan Sitter <ssitter@googlemail.com>, r=mvl

This commit is contained in:
mattwillis%gmail.com 2007-03-07 20:45:33 +00:00
Родитель 10fcc67530
Коммит f118cef754
2 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -130,7 +130,6 @@ function ip_parseString(aICSString) {
uid2parent[item.id] = item;
}
} else {
item.calendar = this;
// force no recurrence info:
item.recurrenceInfo = null;
excItems.push(item);

Просмотреть файл

@ -194,6 +194,21 @@ calMemoryCalendar.prototype = {
}
aItem.calendar = this.calendarToReturn;
var rec = aItem.recurrenceInfo;
if (rec) {
var exceptions = rec.getExceptionIds({});
for each (var exid in exceptions) {
var exception = rec.getExceptionFor(exid, false);
if (exception) {
if (!exception.isMutable) {
exception = exception.clone();
}
exception.calendar = this.calendarToReturn;
rec.modifyException(exception);
}
}
}
aItem.generation = 1;
aItem.makeImmutable();
this.mItems[aItem.id] = aItem;