Skip to content

Commit

Permalink
Merge pull request #10335 from nanaya/wiki-page
Browse files Browse the repository at this point in the history
Fix wiki page urls
  • Loading branch information
notbakaneko authored Jul 5, 2023
2 parents e12724c + 2a6c7b7 commit 739b4eb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ function wiki_image_url(string $path, bool $fullUrl = true)

function wiki_url($path = null, $locale = null, $api = null, $fullUrl = true)
{
$path = $path === null ? 'Main_Page' : str_replace(['%2F', '%23'], ['/', '#'], rawurlencode($path));
$path = $path === null ? 'Main_page' : str_replace(['%2F', '%23'], ['/', '#'], rawurlencode($path));

$params = [
'path' => 'WIKI_PATH',
Expand Down Expand Up @@ -1121,11 +1121,11 @@ function nav_links()
'layout.header.store.orders' => route('store.orders.index'),
];
$links['help'] = [
'page_title.main.wiki_controller._' => wiki_url('Main_Page'),
'page_title.main.wiki_controller._' => wiki_url('Main_page'),
'layout.menu.help.getFaq' => wiki_url('FAQ'),
'layout.menu.help.getRules' => wiki_url('Rules'),
'layout.menu.help.getAbuse' => wiki_url('Reporting_Bad_Behaviour/Abuse'),
'layout.menu.help.getSupport' => wiki_url('Help_Centre'),
'layout.menu.help.getAbuse' => wiki_url('Reporting_bad_behaviour/Abuse'),
'layout.menu.help.getSupport' => wiki_url('Help_centre'),
];

return $links;
Expand All @@ -1144,7 +1144,7 @@ function footer_landing_links()
'faq' => wiki_url('FAQ'),
'forum' => route('forum.forums.index'),
'livestreams' => route('livestreams.index'),
'wiki' => wiki_url('Main_Page'),
'wiki' => wiki_url('Main_page'),
],
'legal' => footer_legal_links(),
];
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livestreams/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="osu-page osu-page--description">
{!! osu_trans('livestreams.top-headers.description', [
'link' => link_to(
wiki_url('Guides/Live_Streaming_osu!'),
wiki_url('Guides/Livestreaming_osu!'),
osu_trans('livestreams.top-headers.link')
),
]) !!}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/wiki/main.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@component('layout._page_header_v4', ['params' => [
'links' => [[
'title' => osu_trans('layout.header.help.index'),
'url' => wiki_url('Main_Page', $page->requestedLocale),
'url' => wiki_url('Main_page', $page->requestedLocale),
]],
'linksBreadcrumb' => true,
'theme' => 'help',
Expand Down
2 changes: 1 addition & 1 deletion resources/views/wiki/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if (!($legal ?? false)) {
$links[] = [
'title' => osu_trans('layout.header.help.index'),
'url' => wiki_url('Main_Page', $page->requestedLocale),
'url' => wiki_url('Main_page', $page->requestedLocale),
];
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/wiki/sitemap.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'links' => [
[
'title' => osu_trans('layout.header.help.index'),
'url' => wiki_url('Main_Page'),
'url' => wiki_url('Main_page'),
],
[
'title' => osu_trans('layout.header.help.sitemap'),
Expand Down

0 comments on commit 739b4eb

Please sign in to comment.