www

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

commit 51f79ad627ee415533f2cfd22da9898fcecf9c40
parent 04660acbd109b8edb26d3391a1629ecf9e130c07
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 22 Jul 2009 09:07:39 +0000

Fix "too many SQL variables" error syncing many item removals from a collection


Diffstat:
Mchrome/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 @@ -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) {