www

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

commit 8d09efb9b5564542e7081adfb4768888227f8529
parent 351d904dbeb16fa48415052aa3ae99206830c0a4
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 27 Nov 2009 20:34:02 +0000

Using ANY mode in Advanced Search window (not saved search) caused all library items to be returned


Diffstat:
Mchrome/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 @@ -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; },