Skip to content

Commit

Permalink
Merge pull request #344 from creative-commoners/pulls/2.0/fix-subsite…
Browse files Browse the repository at this point in the history
…-redirect

FIX Redirect user back to the full current URL after changing subsites
NightJar authored Feb 8, 2018
2 parents 5279748 + ab24aa6 commit 299f127
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Extensions/LeftAndMainSubsites.php
Original file line number Diff line number Diff line change
@@ -296,10 +296,8 @@ public function onBeforeInit()
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.

0 comments on commit 299f127

Please sign in to comment.