Fix Two bugs from Toby Bartels
1. Ensure that "rollback" respects locked pages. 2. Expire revisions of an edited page. Use a before_save hook to deal with the situation where a page's name has been changed.
This commit is contained in:
parent
0e0f666fb4
commit
329fafafce
4 changed files with 16 additions and 1 deletions
|
@ -250,7 +250,11 @@ class WikiController < ApplicationController
|
|||
|
||||
def rollback
|
||||
get_page_and_revision
|
||||
@page.lock(Time.now, @author)
|
||||
if @page.locked?(Time.now) and not params['break_lock']
|
||||
redirect_to :web => @web_name, :action => 'locked', :id => @page_name
|
||||
else
|
||||
@page.lock(Time.now, @author)
|
||||
end
|
||||
end
|
||||
|
||||
def save
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue