- Don't attempt to use connector when it is not available

- Remove some old debug messages that are no longer necessary
This commit is contained in:
Simon Kornblith 2011-07-10 20:25:16 +00:00
parent 69b53b1583
commit 2900f9dcbe

View file

@ -296,9 +296,6 @@ Zotero.Translate.Sandbox = {
var innerSandboxURI = ioService.newURI(typeof translation._sandboxLocation === "object" ?
translation._sandboxLocation.location : translation._sandboxLocation, null, null);
Zotero.debug(outerSandboxURI.spec);
Zotero.debug(innerSandboxURI.spec);
try {
secMan.checkSameOriginURI(outerSandboxURI, innerSandboxURI, false);
} catch(e) {
@ -435,9 +432,6 @@ Zotero.Translate.Sandbox = {
haveAsyncHandler = !callbackExecuted;
}
Zotero.debug("Translate: "+(haveAsyncHandler ? "" : "don't")+" have async handler");
Zotero.debug("Translate: "+(haveAsyncHandler ? "" : "don't")+" have async callback");
if(haveAsyncCallback) {
if(haveAsyncHandler) {
// we are running asynchronously, so increment async processes
@ -510,7 +504,6 @@ Zotero.Translate.Sandbox = {
}
// create short title
Zotero.debug("item type is "+item.itemType);
if(item.shortTitle === undefined && Zotero.Utilities.fieldIsValidForType("shortTitle", item.itemType)) {
// only set if changes have been made
var setShortTitle = false;
@ -879,7 +872,7 @@ Zotero.Translate.Base.prototype = {
var translator = allPotentialTranslators[i];
if(translator.runMode === Zotero.Translator.RUN_MODE_IN_BROWSER) {
this._potentialTranslators.push(translator);
} else if(this instanceof Zotero.Translate.Web) {
} else if(this instanceof Zotero.Translate.Web && Zotero.Connector) {
this._waitingForRPC = true;
}
}