From 49593266e1f5c09cba55484091b01a22d25c93b6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 5 Sep 2008 05:42:59 +0000 Subject: [PATCH] Generate conflict if number of item creators changed --- chrome/content/zotero/xpcom/sync.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 384c8380f4..f4716f6386 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -1487,14 +1487,22 @@ Zotero.Sync.Server.Data = new function() { if (!diff) { // Check if creators changed var creatorsChanged = false; + var creators = obj.getCreators(); - creators = creators.concat(remoteObj.getCreators()); - for each(var creator in creators) { - var r = remoteCreatorStore[creator.ref.id]; - // Doesn't include dateModified - if (r && !r.equals(creator.ref)) { - creatorsChanged = true; - break; + var remoteCreators = remoteObj.getCreators(); + + if (creators.length != remoteCreators.length) { + creatorsChanged = true; + } + else { + creators = creators.concat(remoteCreators); + for each(var creator in creators) { + var r = remoteCreatorStore[creator.ref.id]; + // Doesn't include dateModified + if (r && !r.equals(creator.ref)) { + creatorsChanged = true; + break; + } } } if (!creatorsChanged) {