diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-12 13:46:59 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-12 13:46:59 +0000 |
commit | 8b4003f7fce9e089f2220e6f1a21681f7cf2df3d (patch) | |
tree | 15333943091fc3ae79dedee46a6dd34ce3f1a1ec /app/controllers/request_controller.rb | |
parent | 646fffde374e575ab53cfae78e7a0c521cd90d6f (diff) | |
parent | c96b27c301023a6a1f50c12f0c387205b0255836 (diff) |
Merge remote-tracking branch 'origin/release/0.6.8' into wdtk
Conflicts:
config/general.yml-example
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 3296db6b7..c732a4b32 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -44,7 +44,7 @@ class RequestController < ApplicationController end def show - if !Configuration::varnish_host.nil? + if !Configuration::varnish_host.blank? # If varnish is set up to accept PURGEs, then cache for a # long time long_cache @@ -876,7 +876,7 @@ class RequestController < ApplicationController Zip::ZipFile.open(file_path, Zip::ZipFile::CREATE) { |zipfile| convert_command = Configuration::html_to_pdf_command done = false - if File.exists?(convert_command) + if !convert_command.blank? && File.exists?(convert_command) url = "http://#{Configuration::domain}#{request_url(info_request)}?print_stylesheet=1" tempfile = Tempfile.new('foihtml2pdf') output = AlaveteliExternalCommand.run(convert_command, url, tempfile.path) |