From c62e725e2a8a93fe91f9cef3b58cce9804634cd3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 24 Mar 2020 14:49:57 -0400 Subject: [PATCH] Embed ids directly in Tags.getAllWithin() SQL to avoid parameter limit --- chrome/content/zotero/xpcom/data/tags.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/tags.js b/chrome/content/zotero/xpcom/data/tags.js index 8ec7858726..f3d6c58200 100644 --- a/chrome/content/zotero/xpcom/data/tags.js +++ b/chrome/content/zotero/xpcom/data/tags.js @@ -178,8 +178,7 @@ Zotero.Tags = new function() { params.push(...types); } if (tagIDs) { - sql += "AND tagID IN (" + new Array(tagIDs.length).fill('?').join(', ') + ") "; - params.push(...tagIDs); + sql += "AND tagID IN (" + tagIDs.map(x => parseInt(x)).join(', ') + ") "; } // Not a perfect locale sort, but speeds up the sort in the tag selector later without any // discernible performance cost