Skip to content
Snippets Groups Projects
Commit 570d7e49 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang
Browse files

Fixed: unable to revert to a previous wiki page version.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1821 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1f1fd9e0
Branches
Tags
No related merge requests found
......@@ -66,7 +66,10 @@ class WikiController < ApplicationController
@content.text = "h1. #{@page.pretty_title}" if @content.text.blank?
# don't keep previous comment
@content.comments = nil
if request.post?
if request.get?
# To prevent StaleObjectError exception when reverting to a previous version
@content.version = @page.content.version
else
if !@page.new_record? && @content.text == params[:content][:text]
# don't save if text wasn't changed
redirect_to :action => 'index', :id => @project, :page => @page.title
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment