From 8d09efb9b5564542e7081adfb4768888227f8529 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 27 Nov 2009 20:34:02 +0000 Subject: [PATCH] Using ANY mode in Advanced Search window (not saved search) caused all library items to be returned --- chrome/content/zotero/advancedSearch.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js index ac8cada794..540489ffdd 100644 --- a/chrome/content/zotero/advancedSearch.js +++ b/chrome/content/zotero/advancedSearch.js @@ -29,14 +29,18 @@ var ZoteroAdvancedSearch = new function() { var itemGroup = { isSearchMode: function() { return true; }, getChildItems: function () { - var search = _searchBox.search.clone(); + //var search = _searchBox.search.clone(); + + var s2 = new Zotero.Search(); + s2.setScope(_searchBox.search); + // FIXME: Hack to exclude group libraries for now var groups = Zotero.Groups.getAll(); for each(var group in groups) { - search.addCondition('libraryID', 'isNot', group.libraryID); + s2.addCondition('libraryID', 'isNot', group.libraryID); } - //var search = _searchBox.search; - var ids = search.search(); + + var ids = s2.search(); return Zotero.Items.get(ids); }, isLibrary: function () { return false; },