From 7dad7bcd5ab508e1fe72282522125da3a0eafae5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 8 Aug 2012 03:17:14 -0400 Subject: [PATCH] Require exact 8-character, uppercase item key for quick search --- chrome/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 index 84835d111a..3cbdc711d8 100644 --- 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') {