mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Fix logout form return destination
This commit is contained in:
parent
4aed34ddb0
commit
01b41ac1a0
@ -114,13 +114,15 @@ class BetterNavigatorExtension extends DataExtension
|
|||||||
|
|
||||||
// Add other data for template
|
// Add other data for template
|
||||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||||
|
$logoutForm = LogoutForm::create($this->owner)->setName('BetterNavigatorLogoutForm');
|
||||||
|
$logoutForm->Fields()->fieldByName('BackURL')->setValue($this->owner->Link());
|
||||||
$bNData = array_merge($nav, [
|
$bNData = array_merge($nav, [
|
||||||
'Member' => $member,
|
'Member' => $member,
|
||||||
'Stage' => Versioned::get_stage(),
|
'Stage' => Versioned::get_stage(),
|
||||||
'Viewing' => $viewing, // What we're viewing doesn't necessarily align with the active Stage
|
'Viewing' => $viewing, // What we're viewing doesn't necessarily align with the active Stage
|
||||||
'LoginLink' => Controller::join_links(Director::absoluteBaseURL(), Security::config()->login_url, $backURL),
|
'LoginLink' => Controller::join_links(Director::absoluteBaseURL(), Security::config()->login_url, $backURL),
|
||||||
'LogoutLink' => Controller::join_links(Director::absoluteBaseURL() . Security::config()->logout_url, $backURL),
|
'LogoutLink' => Controller::join_links(Director::absoluteBaseURL() . Security::config()->logout_url, $backURL),
|
||||||
'LogoutForm' => LogoutForm::create($this->owner)->setName('BetterNavigatorLogoutForm'),
|
'LogoutForm' => $logoutForm,
|
||||||
'EditLink' => $editLink,
|
'EditLink' => $editLink,
|
||||||
'Mode' => Director::get_environment_type(),
|
'Mode' => Director::get_environment_type(),
|
||||||
'IsDeveloper' => $isDeveloper
|
'IsDeveloper' => $isDeveloper
|
||||||
|
Loading…
Reference in New Issue
Block a user