commit e35c25e31d905c144132ddb508ed6e902f78c2e7
parent e1258f10130be0e3c8ad3896e37319376d932e8a
Author: Simon Kornblith <simon@simonster.com>
Date: Fri, 17 Jun 2011 18:20:50 +0000
Fix lingering bugs in Chrome/Safari translation
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js
@@ -34,7 +34,6 @@ Zotero.Translate.ItemSaver.ATTACHMENT_MODE_FILE = 2;
Zotero.Translate.ItemSaver.prototype = {
"saveItem":function(item) {
this.newItems.push(item);
- Zotero.debug("Saving item");
- Zotero.Connector.callMethod("saveItems", {"items":[item]});
+ Zotero.Connector.callMethod("saveItems", {"items":[item]}, function(success) {});
}
};
\ No newline at end of file
diff --git a/chrome/content/zotero/xpcom/connector/translator.js b/chrome/content/zotero/xpcom/connector/translator.js
@@ -327,7 +327,7 @@ Zotero.Translator.prototype.preprocessCode = function(code) {
if(!Zotero.isFx) {
const foreach = /^(\s*)for each\s*\((var )?([^ ]+) in (.*?)\)(\s*){/m;
code = code.replace(foreach, "$1var $3_zForEachSubject = $4; "+
- "for(var $3_zForEachIndex in $4_zForEachSubject)$5{ "+
+ "for(var $3_zForEachIndex in $3_zForEachSubject)$5{ "+
"$2$3 = $3_zForEachSubject[$3_zForEachIndex];", code);
Zotero.debug(code);
}