Fix URL generator usage

This commit is contained in:
Toby Zerner 2017-12-29 21:29:04 +10:30
parent 57a91c966d
commit d807171c44
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ class LogOutController implements ControllerInterface
$return = array_get($request->getQueryParams(), 'return');
$view = $this->view->make('flarum.forum::log-out')
->with('url', $this->url->toRoute('logout').'?token='.$csrfToken.($return ? '&return='.urlencode($return) : ''));
->with('url', $this->url->to('forum')->route('logout').'?token='.$csrfToken.($return ? '&return='.urlencode($return) : ''));
return new HtmlResponse($view->render());
}

View File

@ -14,7 +14,7 @@
</div>
@endif
<form class="form" method="POST" action="{{ $url->toRoute('savePassword') }}">
<form class="form" method="POST" action="{{ $url->to('forum')->route('savePassword') }}">
<input type="hidden" name="csrfToken" value="{{ $csrfToken }}">
<input type="hidden" name="passwordToken" value="{{ $passwordToken }}">