diff options
author | David Cabo <david@calibea.com> | 2012-01-06 18:54:37 +0100 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2012-01-06 18:54:37 +0100 |
commit | d4f3ca2a2f7cc68663a9ca005cf379533032d232 (patch) | |
tree | f6d2a07fd1e4f8e1091d5df765b68140db5e47ca /app/controllers/request_controller.rb | |
parent | 7ed887f0989425d9e412890800df05637b08c025 (diff) | |
parent | 766d696d5b914520b0b9367e9b9a9decab87ea5f (diff) |
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index dad5e81cd..f3bbd6708 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -35,9 +35,8 @@ class RequestController < ApplicationController # do nothing - as "authenticated?" has done the redirect to signin page for us return end - if !params[:query].nil? - query = params[:query] + '*' + query = params[:query] query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! @xapian_requests = perform_search([PublicBody], query, 'relevant', nil, 5) end @@ -815,7 +814,8 @@ class RequestController < ApplicationController for message in info_request.incoming_messages attachments = message.get_attachments_for_display for attachment in attachments - zipfile.get_output_stream(attachment.display_filename) { |f| + filename = "#{attachment.url_part_number}_#{attachment.display_filename}" + zipfile.get_output_stream(filename) { |f| f.puts(attachment.body) } end |