diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-02-17 13:27:38 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-02-17 13:27:38 +0000 |
commit | cee79d514e28536e5cfe3d2f1270f0425f35dac1 (patch) | |
tree | d0befa46aac872ab72bad20caac654303c9484ba /app/models | |
parent | 5beb7f546561616236847eea7b522a0e9a4ae6ff (diff) | |
parent | 596bc6e362554dc6d041a15ecfd5d1627deab3d0 (diff) |
Merge branch 'feature/https-fixes' into rails-3-develop
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/foi_attachment.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index acbfc8a34..ecd4a1872 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -359,7 +359,8 @@ class FoiAttachment < ActiveRecord::Base ret = "<html><head></head><body>"; if self.has_google_docs_viewer? wrapper_id = "wrapper_google_embed" - ret = ret + "<iframe src='http://docs.google.com/viewer?url=<attachment-url-here>&embedded=true' width='100%' height='100%' style='border: none;'></iframe>"; + protocol = AlaveteliConfiguration::force_ssl ? 'https' : 'http' + ret = ret + "<iframe src='#{protocol}://docs.google.com/viewer?url=<attachment-url-here>&embedded=true' width='100%' height='100%' style='border: none;'></iframe>"; else ret = ret + "<p>Sorry, we were unable to convert this file to HTML. Please use the download link at the top right.</p>" end |