www

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

commit 99d19f35f794b5921444d883cdc56165356bc8a5
parent 3e7f1f0608573adb360186f5b65ac41ac4209ab2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 28 Nov 2009 05:04:24 +0000

Child items of deleted items appeared in gray (i.e., not deleted) in Trash


Diffstat:
Mchrome/content/zotero/xpcom/search.js | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

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