From c5527a82fbd7c5ed8ca47ec388939fdadc8525f9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 14 Dec 2016 03:37:56 -0500 Subject: [PATCH] Generate new saved search names within libraries, not globally --- chrome/content/zotero/zoteroPane.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index ebf7bfc5d2..25b1a85950 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -951,8 +951,12 @@ var ZoteroPane = new function() s.addCondition('title', 'contains', ''); var untitled = Zotero.getString('pane.collections.untitled'); - untitled = yield Zotero.DB.getNextName('savedSearches', 'savedSearchName', - Zotero.getString('pane.collections.untitled')); + untitled = yield Zotero.DB.getNextName( + s.libraryID, + 'savedSearches', + 'savedSearchName', + Zotero.getString('pane.collections.untitled') + ); var io = {dataIn: {search: s, name: untitled}, dataOut: null}; window.openDialog('chrome://zotero/content/searchDialog.xul','','chrome,modal',io); if (!io.dataOut) {