]> source.dussan.org Git - redmine.git/commitdiff
scm: switch to save repository setting params in "extra_" or not (#8365, #7047).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 03:51:43 +0000 (03:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 03:51:43 +0000 (03:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5769 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/repositories_controller.rb

index d580c28e6948f969d2bb567ed1da3257841b29e3..f53c3d1d6b17f7b5b059c38b5dd480ab5c98d247 100644 (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|