diff --git a/app/controllers/revision_sweeper.rb b/app/controllers/revision_sweeper.rb index 1ab4676b..879274e3 100644 --- a/app/controllers/revision_sweeper.rb +++ b/app/controllers/revision_sweeper.rb @@ -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 diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index fdd83d21..787f8c6a 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -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