commit 75b354a67ec8774b6c9b2c4fe33b748e51f9ac5c parent 0add2d07e6a5a1445a5a677c3b64f046f0810738 Author: Simon Kornblith <simon@simonster.com> Date: Wed, 6 Jul 2011 13:29:06 +0000 Closes #1854, XML mode import issues Diffstat:
| M | chrome/content/zotero/xpcom/translation/translate.js | | | 17 | ++++++++++------- |
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1091,7 +1091,9 @@ Zotero.Translate.Base.prototype = { return; } - if(!this._loadTranslator(this._potentialTranslators[0])) return; + if(!this._loadTranslator(this._potentialTranslators[0])) { + this.complete(false); + } this._prepareDetection(); this.incrementAsyncProcesses(); @@ -1171,12 +1173,13 @@ Zotero.Translate.Base.prototype = { if(this instanceof Zotero.Translate.Export || this instanceof Zotero.Translate.Import) { src += "Zotero.Collection = function () {};"+ "Zotero.Collection.prototype.complete = function() { Zotero._collectionDone(this); };"; - } else if (this instanceof Zotero.Translate.Import) { - // https://bugzilla.mozilla.org/show_bug.cgi?id=609143 - can't pass E4X to sandbox in Fx4 - src += "Zotero.getXML = function() {"+ - "var xml = Zotero._getXML();"+ - "if(typeof xml == 'string') return new XML(xml);"+ - "};"; + if (this instanceof Zotero.Translate.Import) { + // https://bugzilla.mozilla.org/show_bug.cgi?id=609143 - can't pass E4X to sandbox in Fx4 + src += "Zotero.getXML = function() {"+ + "var xml = Zotero._getXML();"+ + "if(typeof xml == 'string') return new XML(xml);"+ + "};"; + } } if(Zotero.isFx) {