Merge pull request #250 from aurimasv/parentTranslator

parentTranslator in detect calls
This commit is contained in:
Simon Kornblith 2013-03-01 09:24:19 -08:00
commit 42d15bf2db

View file

@ -1353,6 +1353,7 @@ Zotero.Translate.Base.prototype = {
this._generateSandbox(); this._generateSandbox();
} }
this._currentTranslator = translator;
this._runningAsyncProcesses = 0; this._runningAsyncProcesses = 0;
this._returnValue = undefined; this._returnValue = undefined;
this._aborted = false; this._aborted = false;
@ -1440,8 +1441,8 @@ Zotero.Translate.Base.prototype = {
this._sandboxManager.sandbox.Zotero.isConnector = Zotero.isConnector || false; this._sandboxManager.sandbox.Zotero.isConnector = Zotero.isConnector || false;
this._sandboxManager.sandbox.Zotero.isServer = Zotero.isServer || false; this._sandboxManager.sandbox.Zotero.isServer = Zotero.isServer || false;
this._sandboxManager.sandbox.Zotero.parentTranslator = this._parentTranslator this._sandboxManager.sandbox.Zotero.parentTranslator = this._parentTranslator
&& this._parentTranslator.translator && this._parentTranslator.translator[0] ? && this._parentTranslator._currentTranslator ?
this._parentTranslator.translator[0].translatorID : null; this._parentTranslator._currentTranslator.translatorID : null;
// create shortcuts // create shortcuts
this._sandboxManager.sandbox.Z = this._sandboxManager.sandbox.Zotero; this._sandboxManager.sandbox.Z = this._sandboxManager.sandbox.Zotero;