From 51f79ad627ee415533f2cfd22da9898fcecf9c40 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 22 Jul 2009 09:07:39 +0000 Subject: [PATCH] Fix "too many SQL variables" error syncing many item removals from a collection --- chrome/content/zotero/xpcom/data/collection.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js index 11fd22e43e..492082a6f1 100644 --- a/chrome/content/zotero/xpcom/data/collection.js +++ b/chrome/content/zotero/xpcom/data/collection.js @@ -514,10 +514,8 @@ Zotero.Collection.prototype.save = function () { if (removed.length) { var sql = "DELETE FROM collectionItems WHERE collectionID=? " - + "AND itemID IN (" - + removed.map(function () '?').join() - + ")"; - Zotero.DB.query(sql, [collectionID].concat(removed)); + + "AND itemID IN (" + removed.join() + ")"; + Zotero.DB.query(sql, collectionID); } if (newids.length) {