From 8614c00c8a3e34e6b081ba2dc1be7985acc4bd4b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 8 May 2007 15:49:20 +0000 Subject: Text files can now be viewed online when browsing the repository. git-svn-id: http://redmine.rubyforge.org/svn/trunk@521 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/repositories_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/controllers/repositories_controller.rb') diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index badbf6ecb..6cb85a8bc 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -61,10 +61,10 @@ class RepositoriesController < ApplicationController end def entry - if 'raw' == params[:format] - content = @repository.scm.cat(@path, @rev) - show_error and return unless content - send_data content, :filename => @path.split('/').last + @content = @repository.scm.cat(@path, @rev) + show_error and return unless @content + if 'raw' == params[:format] + send_data @content, :filename => @path.split('/').last end end -- cgit v1.2.3