Links in Published Webs

Links in published Webs (in particular, the author-link) should be to the published version of the page.
This commit is contained in:
Jacques Distler 2007-09-15 14:39:28 -05:00
parent 4144aa2c98
commit c54a78c026

View file

@ -209,6 +209,7 @@ class WikiController < ApplicationController
@page_name ||= 'HomePage' @page_name ||= 'HomePage'
@page ||= wiki.read_page(@web_name, @page_name) @page ||= wiki.read_page(@web_name, @page_name)
@link_mode ||= :publish
render(:text => "Page '#{@page_name}' not found", :status => 404) and return unless @page render(:text => "Page '#{@page_name}' not found", :status => 404) and return unless @page
@renderer = PageRenderer.new(@page.revisions.last) @renderer = PageRenderer.new(@page.revisions.last)