only save automatic tags if pref is enabled

This commit is contained in:
Simon Kornblith 2011-02-12 19:28:33 +00:00
parent 8e29882889
commit 50cf63f5db

View file

@ -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;