diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/foi_attachment.rb | 2 | ||||
-rw-r--r-- | app/models/incoming_message.rb | 1 | ||||
-rw-r--r-- | app/models/public_body.rb | 2 | ||||
-rw-r--r-- | app/views/request/_request_listing_via_event.rhtml | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index 2f8a9ab04..723bc4abb 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -219,7 +219,7 @@ class FoiAttachment < ActiveRecord::Base def ensure_filename! - if self.filename.nil? + if self.filename.blank? calc_ext = AlaveteliFileTypes.mimetype_to_extension(self.content_type) if !calc_ext calc_ext = "bin" diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index a02d2456a..339a7a3e2 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -284,6 +284,7 @@ class IncomingMessage < ActiveRecord::Base # Lotus notes quoting yeuch! def remove_lotus_quoting(text, replacement = "FOLDED_QUOTED_SECTION") text = text.dup + return text if self.info_request.user_name.nil? name = Regexp.escape(self.info_request.user_name) # To end of message sections diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 57fe27767..96f7733ed 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -520,6 +520,8 @@ class PublicBody < ActiveRecord::Base 'Version', ] public_bodies.each do |public_body| + # Skip bodies we use only for site admin + next if public_body.has_tag?('site_administration') csv << [ public_body.name, public_body.short_name, diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml index ee1cc079a..2ba9613e5 100644 --- a/app/views/request/_request_listing_via_event.rhtml +++ b/app/views/request/_request_listing_via_event.rhtml @@ -25,7 +25,7 @@ end %> <%=event.display_status %> <%= _('by {{public_body_name}} to {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %> <% elsif event.event_type == 'comment' %> - <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %> + <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %> <% else %> <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? However, it can happen that we see other types of event transiently here in the period |