Fixed links to author pages on wiki/revised_pages

This commit is contained in:
Alexey Verkhovsky 2005-04-03 06:34:15 +00:00
parent 1038c2b373
commit 449a7fb8f3
2 changed files with 4 additions and 3 deletions

View file

@ -45,7 +45,7 @@ module ApplicationHelper
# Creates a hyperlink to a Wiki page, or to a "new page" form if the page doesn't exist yet
def link_to_page(page_name, web = @web, text = nil, options = {})
raise 'Web not defined' if web.nil?
home_page_url = url_for :web => web.address, :action => 'show', :id => page_name, :only_path => true
home_page_url = url_for :web => web.address, :action => 'show', :id => 'HomePage', :only_path => true
base_url = home_page_url.sub(%r-/show/HomePage/?$-, '')
web.make_link(page_name, text, options.merge(:base_url => base_url))
end