From 80cfd609ea3ecfda9fa8024abe3ff6edc63f202c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 6 Feb 2018 01:40:50 -0500 Subject: [PATCH] Add `sessionID` option to translate() that gets passed to the ItemSaver This will allow the connector to send a sessionID with a save request. --- chrome/content/zotero/xpcom/translation/translate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 2a6591ace3..87163d91c3 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1292,6 +1292,7 @@ Zotero.Translate.Base.prototype = { this._currentState = "translate"; + this._sessionID = options.sessionID; this._libraryID = options.libraryID; if (options.collections && !Array.isArray(options.collections)) { throw new Error("'collections' must be an array"); @@ -2082,6 +2083,7 @@ Zotero.Translate.Web.prototype._prepareTranslation = Zotero.Promise.method(funct collections: this._collections, attachmentMode: Zotero.Translate.ItemSaver[(this._saveAttachments ? "ATTACHMENT_MODE_DOWNLOAD" : "ATTACHMENT_MODE_IGNORE")], forceTagType: 1, + sessionID: this._sessionID, cookieSandbox: this._cookieSandbox, proxy: this._proxy, baseURI: this.location