scm: switch to save repository setting params in "extra_" or not (#8365, #7047).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5769 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-13 03:51:43 +00:00
parent d21b35d32a
commit ab430a13b5
1 changed files with 11 additions and 1 deletions

View File

@ -41,7 +41,17 @@ class RepositoriesController < ApplicationController
@repository.project = @project if @repository
end
if request.post? && @repository
@repository.attributes = params[:repository]
p1 = params[:repository]
p = {}
p_extra = {}
p1.each do |k, v|
if k =~ /^extra_/
p_extra[k] = v
else
p[k] = v
end
end
@repository.attributes = p
@repository.save
end
render(:update) do |page|