From ba769e0c7eba0bd064afe728354aadab54dd7dfa Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 29 Nov 2017 13:47:00 +1030 Subject: [PATCH] Preserve return URL when confirming logout --- src/Forum/Controller/LogOutController.php | 3 ++- views/log-out.blade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Forum/Controller/LogOutController.php b/src/Forum/Controller/LogOutController.php index 4dbb891cf..35bd09af3 100644 --- a/src/Forum/Controller/LogOutController.php +++ b/src/Forum/Controller/LogOutController.php @@ -107,7 +107,8 @@ class LogOutController implements ControllerInterface if (array_get($request->getQueryParams(), 'token') !== $csrfToken) { $view = $this->view->make('flarum.forum::log-out') ->with('csrfToken', $csrfToken) - ->with('forumTitle', $this->settings->get('forum_title')); + ->with('forumTitle', $this->settings->get('forum_title')) + ->with('return', array_get($request->getQueryParams(), 'return')); return new HtmlResponse($view->render()); } diff --git a/views/log-out.blade.php b/views/log-out.blade.php index 5f777dda3..988beeeef 100644 --- a/views/log-out.blade.php +++ b/views/log-out.blade.php @@ -7,7 +7,7 @@

{{ $translator->trans('core.views.log_out.log_out_confirmation', ['{forum}' => $forumTitle]) }}

- + {{ $translator->trans('core.views.log_out.log_out_button') }}