Fixed a nasty bug that caused Instiki to go into an endless loop on call to /wiki/print/
This commit is contained in:
parent
1d44ce1c18
commit
16454549fe
2 changed files with 7 additions and 0 deletions
|
@ -23,5 +23,9 @@ class RevisionSweeper < ActionController::Caching::Sweeper
|
|||
:action => %w(authors recently_revised list)
|
||||
expire_fragment :controller => 'wiki', :web => web.address,
|
||||
:action => %w(rss_with_headlines rss_with_content)
|
||||
WikiReference.pages_that_reference(page.name).each do |ref|
|
||||
expire_action :controller => 'wiki', :web => web.address,
|
||||
:action => %w(show published), :id => ref.page.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -156,6 +156,9 @@ class WikiController < ApplicationController
|
|||
end
|
||||
|
||||
def print
|
||||
if @page.nil?
|
||||
redirect_home
|
||||
end
|
||||
@link_mode ||= :show
|
||||
@renderer = PageRenderer.new(@page.revisions.last)
|
||||
# to template
|
||||
|
|
Loading…
Reference in a new issue