From d50b6667f0201dac0a46b8ef4ea4c50828b49d5b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 16 Mar 2015 23:50:24 -0400 Subject: [PATCH] Fix moving items to trash (from bf36a988e4) --- chrome/content/zotero/xpcom/data/item.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 908e9727b..5b10603d8 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -77,7 +77,6 @@ Zotero.Item = function(itemTypeOrID) { this._fileExists = null; this._deleted = null; - this._publication = null; this._hasNote = null; this._noteAccessTime = null; @@ -1057,8 +1056,8 @@ Zotero.Item.prototype.removeCreator = function(orderIndex, allowMissing) { } -// Define 'deleted' and 'publication' properties -for (let name of ['deleted', 'publication']) { +// Define 'deleted' property (and any others that follow the same pattern in the future) +for (let name of ['deleted']) { let prop = '_' + name; Zotero.defineProperty(Zotero.Item.prototype, name, { @@ -1079,7 +1078,7 @@ for (let name of ['deleted', 'publication']) { + " state hasn't changed for item " + this.id); return; } - this._markFieldChange('publication', !!this[prop]); + this._markFieldChange(name, !!this[prop]); this._changed[name] = true; this[prop] = val; }