www

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

commit 369253677042d1f0f7ff99656a44ed2951491b61
parent 532d48579314dcbfe350cd5d95a0b99d5ad9be86
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 31 Oct 2015 17:13:51 -0400

Fixes #862, Trash Looks Empty

Broken by 3ff1ff88a9

Diffstat:
Mchrome/content/zotero/xpcom/search.js | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -1051,13 +1051,15 @@ Zotero.Search.prototype._buildQuery = Zotero.Promise.coroutine(function* () { } // Exclude deleted items (and their child items) by default - sql += " WHERE itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM deletedItems) " - + "AND itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM itemNotes " + sql += " WHERE (" + + "itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM deletedItems) " + + "OR itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM itemNotes " + "WHERE parentItemID IS NOT NULL AND " + "parentItemID IN (SELECT itemID FROM deletedItems)) " - + "AND itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM itemAttachments " + + "OR itemID " + (deleted ? "" : "NOT ") + "IN (SELECT itemID FROM itemAttachments " + "WHERE parentItemID IS NOT NULL AND " - + "parentItemID IN (SELECT itemID FROM deletedItems))"; + + "parentItemID IN (SELECT itemID FROM deletedItems))" + + ")"; if (noChildren){ sql += " AND (itemID NOT IN (SELECT itemID FROM itemNotes "