diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-12-13 17:27:39 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-12-13 17:27:39 +0000 |
commit | 4075d5a70a6e08c1d55e97dbfc13fda4a2faaf84 (patch) | |
tree | f46f09858bc4140394e60fe0f37a8ee15a8d134a /app/controllers/request_controller.rb | |
parent | 8405aeefaf1b4f72e1bc781995547d775e8991d7 (diff) |
Further improvements to attachment caching
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 1801648ca..f7d870b4f 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -690,7 +690,6 @@ class RequestController < ApplicationController # check permissions raise "internal error, pre-auth filter should have caught this" if !@info_request.user_can_view?(authenticated_user) - @attachment = IncomingMessage.get_attachment_by_url_part_number(@incoming_message.get_attachments_for_display, @part_number) raise ActiveRecord::RecordNotFound.new("attachment not found part number " + @part_number.to_s + " incoming_message " + @incoming_message.id.to_s) if @attachment.nil? @@ -713,6 +712,7 @@ class RequestController < ApplicationController :email => _("Then you can upload an FOI response. "), :email_subject => _("Confirm your account on {{site_name}}",:site_name=>site_name) } + if !authenticated?(@reason_params) return end @@ -754,6 +754,7 @@ class RequestController < ApplicationController def search_typeahead # Since acts_as_xapian doesn't support the Partial match flag, we work around it # by making the last work a wildcard, which is quite the same + query = params[:q] + '*' query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! |