From 50cf63f5dba40d2829b65c40c04876437ebc30fb Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 12 Feb 2011 19:28:33 +0000 Subject: [PATCH] only save automatic tags if pref is enabled --- chrome/content/zotero/xpcom/translation/item_local.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/item_local.js b/chrome/content/zotero/xpcom/translation/item_local.js index 7414c55084..f571f7e770 100644 --- a/chrome/content/zotero/xpcom/translation/item_local.js +++ b/chrome/content/zotero/xpcom/translation/item_local.js @@ -463,6 +463,10 @@ Zotero.Translate.ItemSaver.prototype = { newItem.save(); } + // if all tags are automatic and automatic tags pref is on, return immediately + var tagPref = Zotero.Prefs.get("automaticTags"); + if(this._forceTagType == 1 && !tagPref) return; + // add tags if(item.tags) { var tagsToAdd = {}; @@ -486,6 +490,8 @@ Zotero.Translate.ItemSaver.prototype = { if(this._forceTagType) { var tagType = this._forceTagType; } else if(tag.type) { + // skip automatic tags during import too (?) + if(tag.type == 1 && !tagPref) continue; var tagType = tag.type; } else { var tagType = 0;