|
|
|
@ -431,7 +431,10 @@ update
|
|
|
|
|
|
|
|
|
|
def entry
|
|
|
|
|
entry_and_raw(false)
|
|
|
|
|
render :layout => 'base_projects'
|
|
|
|
|
@content = @repository.cat(@path, @rev)
|
|
|
|
|
if is_entry_text_data?(@content, @path)
|
|
|
|
|
render :layout => 'base_projects'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def entry_and_raw(is_raw)
|
|
|
|
@ -443,9 +446,7 @@ update
|
|
|
|
|
|
|
|
|
|
@content = @repository.cat(@path, @rev)
|
|
|
|
|
(show_error_not_found; return) unless @content
|
|
|
|
|
if is_raw ||
|
|
|
|
|
(@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) ||
|
|
|
|
|
! is_entry_text_data?(@content, @path)
|
|
|
|
|
if is_raw || (@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) || !is_entry_text_data?(@content, @path)
|
|
|
|
|
# Force the download
|
|
|
|
|
send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
|
|
|
|
|
send_type = Redmine::MimeType.of(@path)
|
|
|
|
|