* [sup-talk] Bugfix for custom-search
@ 2009-10-01 17:38 Edward Z. Yang
2009-10-06 22:44 ` Edward Z. Yang
0 siblings, 1 reply; 3+ messages in thread
From: Edward Z. Yang @ 2009-10-01 17:38 UTC (permalink / raw)
I think there's a slight bug in the custom-search implementation.
Patch is here:
From cea17180933469570e9502ffa7bf67ccaa8ccfc7 Mon Sep 17 00:00:00 2001
From: Edward Z. Yang <edwardzyang at thewritingpot.com>
Date: Wed, 10 Jun 2009 01:42:50 -0400
Subject: [PATCH] Fix bug in which custom-search substitutions are not used.
Signed-off-by: Edward Z. Yang <ezyang at mit.edu>
---
lib/sup/ferret_index.rb | 2 +-
lib/sup/xapian_index.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/ferret_index.rb b/lib/sup/ferret_index.rb
index d605e8d..34dff87 100644
--- 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
index ab25ea0..e1cfe65 100644
--- 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]
--
1.6.4.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] Bugfix for custom-search
2009-10-01 17:38 [sup-talk] Bugfix for custom-search Edward Z. Yang
@ 2009-10-06 22:44 ` Edward Z. Yang
2009-10-12 13:51 ` William Morgan
0 siblings, 1 reply; 3+ messages in thread
From: Edward Z. Yang @ 2009-10-06 22:44 UTC (permalink / raw)
To: sup-talk
Excerpts from Edward Z. Yang's message of Thu Oct 01 13:38:27 -0400 2009:
> I think there's a slight bug in the custom-search implementation.
Any comments?
Cheers,
Edward
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] Bugfix for custom-search
2009-10-06 22:44 ` Edward Z. Yang
@ 2009-10-12 13:51 ` William Morgan
0 siblings, 0 replies; 3+ messages in thread
From: William Morgan @ 2009-10-12 13:51 UTC (permalink / raw)
To: sup-talk
Reformatted excerpts from Edward Z. Yang's message of 2009-10-06:
> Any comments?
Sorry about the delay. Applied directly to master. I was sure I had done
this right, but somehow it was only reflected in next, not in master. Oh
well. Thanks!
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-12 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-01 17:38 [sup-talk] Bugfix for custom-search Edward Z. Yang
2009-10-06 22:44 ` Edward Z. Yang
2009-10-12 13:51 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox