Skip to content

Commit

Permalink
Get current route correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 27, 2017
1 parent 8f522ee commit 59f7f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function init()
if ($config->get('plugins.admin.enabled')) {
$route = $config->get('plugins.admin.route');
// Uri::route() is not processed yet, let's quickly get what we need
$current_route = str_replace($base_url, '', parse_url($uri->url(true), PHP_URL_PATH));
$current_route = str_replace(Uri::filterPath($base_url), '', parse_url($uri->url(true), PHP_URL_PATH));
$base = '/' . trim($route, '/');

if (substr($current_route, 0, strlen($base)) == $base || //handle no language specified
Expand Down

0 comments on commit 59f7f15

Please sign in to comment.