www

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

commit 7dad7bcd5ab508e1fe72282522125da3a0eafae5
parent f6e7cf83fac6273d96368045696cfcb0219430e3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  8 Aug 2012 03:17:14 -0400

Require exact 8-character, uppercase item key for quick search

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

diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -411,8 +411,9 @@ Zotero.Search.prototype.addCondition = function(condition, operator, value, requ for each(var part in parts) { this.addCondition('blockStart'); - if (operator == 'contains' && part.text.length > 1) { - this.addCondition('key', 'beginsWith', part.text, false); + // If search string is 8 characters, see if this is a item key + if (operator == 'contains' && part.text.length == 8) { + this.addCondition('key', 'is', part.text, false); } if (condition == 'quicksearch-titleCreatorYear') {