Skip to content

Commit

Permalink
FIX Redirect user back to the full current URL after changing subsites
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Feb 7, 2018
1 parent 73943af commit ab24aa6
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
Expand Up @@ -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.
Expand Down

0 comments on commit ab24aa6

Please sign in to comment.