Fixes a bug where the link to subproject wiki page points to parent project (#43631).

git-svn-id: https://svn.redmine.org/redmine/trunk@24336 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2026-01-21 07:03:25 +00:00
parent 3ad25e2223
commit ff5a336ddb
2 changed files with 3 additions and 1 deletions

View File

@@ -261,7 +261,7 @@ module Redmine
pages.each do |page|
concat(
tag.li do
html = link_to(h(page.pretty_title), project_wiki_page_path(project, page.title))
html = link_to(h(page.pretty_title), project_wiki_page_path(page.project, page.title))
html << " (#{time_ago_in_words(page.content.updated_on)})" if is_show_time
html
end

View File

@@ -668,7 +668,9 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
# With include_subprojects=true
result = textilizable('{{recent_pages(include_subprojects=true)}}')
assert_select_in result, 'ul>li', :text => /Subproject Page/, :count => 1
assert_select_in result, 'a[href=?]', wiki_page_path(page)
end
def test_recent_pages_macro_should_not_include_projects_with_wiki_module_disabled