www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e157d8bc576dfd5f0d0862c8b2bf18e6df8a4fa9
parent ce12c999ca4914c1b10b923d79006bd6e37f9885
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  7 Feb 2013 17:36:37 -0500

Fix sync error downloading new item with related item

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 16----------------
1 file changed, 0 insertions(+), 16 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -1546,26 +1546,10 @@ Zotero.Item.prototype.save = function() { var newids = []; var currentIDs = this._getRelatedItems(true); - for each(var id in this._previousData.related) { - if (currentIDs.indexOf(id) == -1) { - removed.push(id); - } - } for each(var id in currentIDs) { - if (this._previousData.related.indexOf(id) != -1) { - continue; - } newids.push(id); } - if (removed.length) { - var sql = "DELETE FROM itemSeeAlso WHERE itemID=? " - + "AND linkedItemID IN (" - + removed.map(function () '?').join() - + ")"; - Zotero.DB.query(sql, [itemID].concat(removed)); - } - if (newids.length) { var sql = "INSERT INTO itemSeeAlso (itemID, linkedItemID) VALUES (?,?)"; var insertStatement = Zotero.DB.getStatement(sql);