commit 6fe3ef27d48cbdb88748cea5d30faa10067f3ec4
parent 7b8d8023f2fa28007ee0e1cb2e55a87fc279b411
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 7 Feb 2012 18:15:28 -0500
Screw with the way we handle citation IDs instead of indices, since that's closer to the root of the problem
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
@@ -1863,7 +1863,6 @@ Zotero.Integration.Session = function(doc) {
this.uncitedItems = {};
this.omittedItems = {};
this.embeddedItems = {};
- this.newIndices = {};
this.embeddedZoteroItems = {};
this.embeddedZoteroItemsByURI = {};
this.customBibliographyText = {};
@@ -1882,6 +1881,7 @@ Zotero.Integration.Session.prototype.resetRequest = function(doc) {
this.bibliographyDataHasChanged = false;
this.updateItemIDs = {};
this.updateIndices = {};
+ this.newIndices = {};
this.oldCitationIDs = this.citationIDs;
@@ -2131,7 +2131,6 @@ Zotero.Integration.Session.prototype.addCitation = function(index, noteIndex, ar
this.updateIndices[index] = true;
}
Zotero.debug("Integration: Adding citationID "+citation.citationID);
- this.citationIDs[citation.citationID] = true;
}
/**
@@ -2514,9 +2513,7 @@ Zotero.Integration.Session.prototype.updateCitations = function(callback) {
if(this.formatCitation(index, citation)) {
this.bibliographyHasChanged = true;
}
- if(!this.citationIDs[citation.citationID]) {
- this.citationIDs[citation.citationID] = citation;
- }
+ this.citationIDs[citation.citationID] = true;
delete this.newIndices[index];
yield true;
}