Add Redmine links for repository files using source: and export: keyworkds (#867).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1267 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-03-17 17:45:01 +00:00
parent cab300e650
commit 93d1b2e0a4
5 changed files with 57 additions and 30 deletions
+2 -1
View File
@@ -97,7 +97,8 @@ class RepositoriesController < ApplicationController
def entry
@content = @repository.scm.cat(@path, @rev)
show_error_not_found and return unless @content
if 'raw' == params[:format]
if 'raw' == params[:format] || @content.is_binary_data?
# Force the download if it's a binary file
send_data @content, :filename => @path.split('/').last
else
# Prevent empty lines when displaying a file with Windows style eol