Fixed: Simultaneous wiki updates cause internal error (#7939).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5185 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-03-21 16:55:28 +00:00
parent 3acae2529e
commit 3d551f97e1
2 changed files with 38 additions and 4 deletions
+2 -4
View File
@@ -100,9 +100,6 @@ class WikiController < ApplicationController
# To prevent StaleObjectError exception when reverting to a previous version
@content.version = @page.content.version
rescue ActiveRecord::StaleObjectError
# Optimistic locking exception
flash[:error] = l(:notice_locking_conflict)
end
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
@@ -138,7 +135,8 @@ class WikiController < ApplicationController
rescue ActiveRecord::StaleObjectError
# Optimistic locking exception
flash[:error] = l(:notice_locking_conflict)
flash.now[:error] = l(:notice_locking_conflict)
render :action => 'edit'
end
# rename a page