aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/request_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 7ac979453..c96e44fd2 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.85 2008-05-15 22:18:19 francis Exp $
+# $Id: request_controller.rb,v 1.86 2008-05-18 03:45:06 francis Exp $
class RequestController < ApplicationController
@@ -30,7 +30,7 @@ class RequestController < ApplicationController
@new_responses_count = @events_needing_description.select {|i| i.event_type == 'response'}.size
# Sidebar stuff
- limit = 3 + 1
+ # ... requests made by same person to same authority
@info_requests_same_user_same_body = InfoRequest.find(:all, :order => "created_at desc",
:conditions => ["prominence = 'normal' and user_id = ? and public_body_id = ? and id <> ?", @info_request.user_id, @info_request.public_body_id, @info_request.id],
:limit => limit)
@@ -39,6 +39,9 @@ class RequestController < ApplicationController
@info_requests_same_user_same_body = @info_requests_same_user_same_body[0, limit - 1]
@info_requests_same_user_same_body_more = true
end
+ # ... requests that have similar imporant terms
+ @xapian_similar = ::ActsAsXapian::Similar.new([InfoRequestEvent], @info_request.info_request_events,
+ :limit => limit - 1, :collapse_by_prefix => 'request_collapse')
# Track corresponding to this page
@track_thing = TrackThing.create_track_for_request(@info_request)