commit 3238656ca0971d09e0a9c6712c348d1dfd3d65f3
parent 4d307c18654f80c20eb5a0df7bc65311c8a81fc8
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 12 Jul 2011 04:34:06 +0000
- Zotero.Translate.Import#getTranslators should return translators when they are available
- Add deprecation warning for select handler without a callback
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -425,6 +425,10 @@ Zotero.Translate.Sandbox = {
var returnValue = translate._runHandler("select", items, newCallback);
if(returnValue !== undefined) {
// handler may have returned a value, which makes callback unnecessary
+ Zotero.debug("WARNING: Returning items from a select handler is deprecated. "+
+ "Please pass items as to the callback provided as the third argument to "+
+ "the handler.");
+
returnedItems = returnValue;
haveAsyncHandler = false;
} else {
@@ -1520,7 +1524,7 @@ Zotero.Translate.Import.prototype.getTranslators = function() {
});
if(this._currentState === null) return this._foundTranslators;
} else {
- Zotero.Translate.Base.prototype.getTranslators.call(this);
+ return Zotero.Translate.Base.prototype.getTranslators.call(this);
}
}