Fixed links to author pages on wiki/revised_pages
This commit is contained in:
parent
1038c2b373
commit
449a7fb8f3
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue