解决版本库提交记录中:上传图片或者非可以预览文件 显示详情500问题
This commit is contained in:
parent
4c5052dce2
commit
3198f8a473
|
@ -49,7 +49,7 @@ class RepositoriesController < ApplicationController
|
|||
helper :project_score
|
||||
#@root_path = RepositoriesHelper::ROOT_PATH
|
||||
$g=Gitlab.client
|
||||
require 'net/ssh'
|
||||
# require 'net/ssh'
|
||||
|
||||
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
|
||||
def new
|
||||
|
|
|
@ -65,7 +65,7 @@ module RepositoriesHelper
|
|||
|
||||
# 获取diff内容行号
|
||||
def diff_line_num content
|
||||
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||
end
|
||||
|
||||
# 处理内容
|
||||
|
|
Loading…
Reference in New Issue