www

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

commit aa458dcd63e99beffea88cb71a3a2e6428936e4f
parent fe263cd531b50682e6462cc7cc0f74554bb01e84
Author: Dan Stillman <dstillman@gmail.com>
Date:   Fri,  1 Mar 2013 16:31:02 -0800

Merge pull request #261 from gracile-fr/3.1-quickSearch-date

Include dateDecided, dateEnacted, issueDate in "Title, Creator, Year"
Diffstat:
Mchrome/content/zotero/xpcom/search.js | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -1197,8 +1197,20 @@ Zotero.Search.prototype._buildQuery = function(){ break; case 'year': - condSQL += 'fieldID IN (?) AND '; condSQLParams.push(Zotero.ItemFields.getID('date')); + //Add base field + var dateFields = Zotero.ItemFields.getTypeFieldsFromBase('date'); + if (dateFields) { + condSQL += 'fieldID IN (?,'; + // Add type-specific date fields (dateEnacted, dateDecided, issueDate) + for each(var fieldID in dateFields) { + condSQL += '?,'; + condSQLParams.push(fieldID); + } + condSQL = condSQL.substr(0, condSQL.length - 1); + condSQL += ') AND '; + } + condSQL += "valueID IN (SELECT valueID FROM " + "itemDataValues WHERE ";