diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-03-04 08:54:57 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-03-04 08:54:57 +1100 |
commit | ab8f4379a6b43cd5578a6a7d6268cb904e69b2ff (patch) | |
tree | 4ae8d48f80858611faccf7ce87816bc321296290 /app/controllers/request_controller.rb | |
parent | 2e9b6d80aee6bfe15149566c9c9a0a62fd1ab39e (diff) |
Inline temporary variables
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 9a7b6d1c8..f958a4746 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -384,13 +384,9 @@ class RequestController < ApplicationController return end - is_owning_user = info_request.is_owning_user?(authenticated_user) - last_info_request_event_id = info_request.last_event_id_needing_description - old_unclassified = info_request.is_old_unclassified? && !authenticated_user.nil? - # Check authenticated, and parameters set. We check is_owning_user # to get admin overrides (see is_owning_user? above) - if !old_unclassified && !is_owning_user && !authenticated_as_user?(info_request.user, + if !(authenticated_user && info_request.is_old_unclassified?) && !info_request.is_owning_user?(authenticated_user) && !authenticated_as_user?(info_request.user, :web => _("To classify the response to this FOI request"), :email => _("Then you can classify the FOI response you have got from ") + info_request.public_body.name + ".", :email_subject => _("Classify an FOI response from ") + info_request.public_body.name @@ -405,7 +401,7 @@ class RequestController < ApplicationController return end - if params[:last_info_request_event_id].to_i != last_info_request_event_id + if params[:last_info_request_event_id].to_i != info_request.last_event_id_needing_description flash[:error] = _("The request has been updated since you originally loaded this page. Please check for any new incoming messages below, and try again.") redirect_to request_url(info_request) return |