From 8a8846151e553e4928ecd638175c3b3d7b0b9f87 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 4 Jan 2010 15:02:51 -0300 Subject: [PATCH] Not store article as origin location for downloads --- app/controllers/public/content_viewer_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index accb8e9..f843298 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -52,7 +52,6 @@ class ContentViewerController < ApplicationController # At this point the page will be showed @page.hit - store_location unless @page.mime_type == 'text/html' || (@page.image? && params[:view]) headers['Content-Type'] = @page.mime_type @@ -67,6 +66,9 @@ class ContentViewerController < ApplicationController return end + # store location if the page is not a download + store_location + @form_div = params[:form] if request.post? && params[:comment] && params[self.icaptcha_field].blank? && @page.accept_comments? -- libgit2 0.21.2