Bug 827078 - Items deleted server-side still appear in cached CalDAV calendars - part 1: preserve meta-data when items added. r=redDragon

This commit is contained in:
Matthew Mecca 2013-01-20 08:55:04 -05:00
Родитель c5d65a4089
Коммит 3a7a588a9e
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -441,7 +441,7 @@ calStorageCalendar.prototype = {
if (olditem) {
if (this.relaxedMode) {
// we possibly want to interact with the user before deleting
this.deleteItemById(aItem.id);
this.deleteItemById(aItem.id, true);
} else {
this.notifyOperationComplete(aListener,
Components.interfaces.calIErrors.DUPLICATE_ID,
@ -572,7 +572,7 @@ calStorageCalendar.prototype = {
}
modifiedItem.makeImmutable();
this.flushItem (modifiedItem, aOldItem);
this.flushItem(modifiedItem, aOldItem);
this.setOfflineJournalFlag(aNewItem, oldOfflineFlag);
this.notifyOperationComplete(aListener,
@ -1968,7 +1968,7 @@ calStorageCalendar.prototype = {
ASSERT(!item.recurrenceId, "no parent item passed!", true);
try {
this.deleteItemById(olditem ? olditem.id : item.id, !!olditem);
this.deleteItemById(olditem ? olditem.id : item.id, true);
this.acquireTransaction();
this.writeItem(item, olditem);
} catch (e) {
@ -2325,7 +2325,7 @@ calStorageCalendar.prototype = {
this.executeItemStatement(this.mDeleteMetaData, "item_id", id);
try {
this.prepareStatement(this.mInsertMetaData);
var sp = this.mInsertMetaData.params;
let sp = this.mInsertMetaData.params;
sp.item_id = id;
sp.value = value;
this.mInsertMetaData.executeStep();