From f9f6e5340c386814124713029908ef35b609e9bc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 4 Apr 2009 20:52:44 +0000 Subject: [PATCH] Add lastName search condition (API only, not in the search UI) --- chrome/content/zotero/xpcom/search.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index 56c7655daa..391780c44b 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -1150,6 +1150,7 @@ Zotero.Search.prototype._buildQuery = function(){ break; case 'creator': + case 'lastName': condSQL += "creatorID IN (SELECT creatorID FROM creators " + "NATURAL JOIN creatorData WHERE "; openParens++; @@ -1822,6 +1823,19 @@ Zotero.SearchConditions = new function(){ field: "firstName || ' ' || lastName" }, + { + name: 'lastName', + operators: { + is: true, + isNot: true, + contains: true, + doesNotContain: true + }, + table: 'itemCreators', + field: 'lastName', + special: true + }, + { name: 'field', operators: {