mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 19:53:07 +00:00
wiki page won't be saved (and versioned) if no change is made to text
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@318 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
19dabda953
commit
02ff5764d5
@ -45,8 +45,14 @@ class WikiController < ApplicationController
|
||||
@page.content = WikiContent.new(:page => @page) if @page.new_record?
|
||||
@content = @page.content
|
||||
@content.text = "h1. #{@page.pretty_title}" if @content.text.empty?
|
||||
# don't keep previous comment
|
||||
@content.comment = nil
|
||||
if request.post?
|
||||
if request.post?
|
||||
if @content.text == params[:content][:text]
|
||||
# don't save if text wasn't changed
|
||||
redirect_to :action => 'index', :id => @project, :page => @page.title
|
||||
return
|
||||
end
|
||||
@content.text = params[:content][:text]
|
||||
@content.comment = params[:content][:comment]
|
||||
@content.author = logged_in_user
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user