Merge pull request #344 from creative-commoners/pulls/2.0/fix-subsite-redirect

FIX Redirect user back to the full current URL after changing subsites
This commit is contained in:
Dylan Wagstaff 2018-02-09 10:21:24 +13:00 committed by GitHub
commit 299f12765c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,10 +296,8 @@ class LeftAndMainSubsites extends LeftAndMainExtension
return $this->owner->redirect($request->getURL(true));
}
// Redirect to clear the current page, retaining the current URL parameters
return $this->owner->redirect(
Controller::join_links($this->owner->Link(), ...array_values($this->owner->getURLParams()))
);
// Redirect back to the default admin URL
return $this->owner->redirect($request->getURL());
}
// Automatically redirect the session to appropriate subsite when requesting a record.