diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-08 15:49:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-08 15:49:20 +0000 |
commit | 8614c00c8a3e34e6b081ba2dc1be7985acc4bd4b (patch) | |
tree | 983e866e4ec21a84783a9063059957728f4d0d43 /app/controllers/repositories_controller.rb | |
parent | df0a49ff14474dd2230a823f57e95aa9d3b1cd71 (diff) | |
download | redmine-8614c00c8a3e34e6b081ba2dc1be7985acc4bd4b.tar.gz redmine-8614c00c8a3e34e6b081ba2dc1be7985acc4bd4b.zip |
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
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r-- | app/controllers/repositories_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |