Collection item membership conflict resulted in removal of local items from collection

This commit is contained in:
Dan Stillman 2009-07-26 05:45:22 +00:00
parent 123e2d552d
commit 1b0ec5d3be

View file

@ -2585,7 +2585,7 @@ Zotero.Sync.Server.Data = new function() {
} }
function _mergeCollection(localObj, remoteObj, childItems) { function _mergeCollection(localObj, remoteObj, childItemStore) {
var diff = localObj.diff(remoteObj, false, true); var diff = localObj.diff(remoteObj, false, true);
if (!diff) { if (!diff) {
return false; return false;
@ -2645,7 +2645,7 @@ Zotero.Sync.Server.Data = new function() {
alert(msg); alert(msg);
} }
_removeChildItemsFromCollection(targetObj, childItems); _removeChildItemsFromCollection(targetObj, childItemStore);
targetObj.save(); targetObj.save();
return true; return true;
@ -3479,6 +3479,7 @@ Zotero.Sync.Server.Data = new function() {
conditionID++; conditionID++;
while (search.getSearchCondition(conditionID)) { while (search.getSearchCondition(conditionID)) {
search.removeCondition(conditionID); search.removeCondition(conditionID);
conditionID++;
} }
return search; return search;