diff options
author | francis <francis> | 2008-03-19 05:46:52 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-19 05:46:52 +0000 |
commit | 81b615fa3f2db6d26140cf2898666e138a15e027 (patch) | |
tree | f60a60e23361a497ce3ea657765ab8a514855e98 /app/helpers/application_helper.rb | |
parent | 8f52bf3241deb33a8528c5245f4eb2f42b73c890 (diff) |
Remove unused function.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9f7bbabdf..b6513155d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,7 +5,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: application_helper.rb,v 1.17 2008-03-06 21:49:33 francis Exp $ +# $Id: application_helper.rb,v 1.18 2008-03-19 05:46:52 francis Exp $ module ApplicationHelper # URL generating functions are needed by all controllers (for redirects) @@ -42,24 +42,6 @@ module ApplicationHelper end end - # Used for search results - def excerpt_and_highlight(text, words, count = 150) - # Find at least one word if we can - t = nil - for word in words - t = excerpt(text, word, count) - if not t.nil? - break - end - end - if t.nil? - t = excerpt(text, "", count * 2) - end - - # Highlight all the words, escaping HTML also - t = highlight_words(t, words) - return t - end # Highlight words, also escapes HTML (other than spans that we add) def highlight_words(t, words) t = h(t) |