www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 0383f104dd88e306391afcfa3438b1209cec1762
parent d38d55e2b4b2a3c3fca01b8f94f7721b406ba0a2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 14 Jun 2018 16:40:03 -0400

Fix "Import into new collection" option when handling importable file

Diffstat:
Mchrome/content/zotero/fileInterface.js | 5++++-
Mcomponents/zotero-service.js | 5++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js @@ -306,7 +306,10 @@ var Zotero_File_Interface = new function() { } if (typeof options == 'string' || options instanceof Components.interfaces.nsIFile) { Zotero.debug("WARNING: importFile() now takes a single options object -- update your code"); - options = { file: options }; + options = { + file: options, + createNewCollection: arguments[1] + }; } var file = options.file ? Zotero.File.pathToFile(options.file) : null; diff --git a/components/zotero-service.js b/components/zotero-service.js @@ -636,7 +636,10 @@ ZoteroCommandLineHandler.prototype = { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var browserWindow = wm.getMostRecentWindow("navigator:browser"); - browserWindow.Zotero_File_Interface.importFile(file, checkState.value); + browserWindow.Zotero_File_Interface.importFile({ + file, + createNewCollection: checkState.value + }); } } });