commit 2dfd378b616243d03203e49f5ee29636051d3cbf
parent 4a32776f523039cdcbb6165d58e24bd9753b256b
Author: Edward Z. Yang <edwardzyang@thewritingpot.com>
Date: Wed, 10 Jun 2009 01:42:50 -0400
fix bug in which custom-search substitutions are not used
Signed-off-by: Edward Z. Yang
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/ferret_index.rb b/lib/sup/ferret_index.rb
@@ -340,7 +340,7 @@ EOS
query = {}
subs = HookManager.run("custom-search", :subs => s) || s
- subs = s.gsub(/\b(to|from):(\S+)\b/) do
+ subs = subs.gsub(/\b(to|from):(\S+)\b/) do
field, name = $1, $2
if(p = ContactManager.contact_for(name))
[field, p.email]
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
@@ -193,7 +193,7 @@ EOS
query = {}
subs = HookManager.run("custom-search", :subs => s) || s
- subs = s.gsub(/\b(to|from):(\S+)\b/) do
+ subs = subs.gsub(/\b(to|from):(\S+)\b/) do
field, name = $1, $2
if(p = ContactManager.contact_for(name))
[field, p.email]