mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 19:06:16 +01:00
Fix #1034 redirect of page creation procedure when system.home.hide_in_urls is enabled
This commit is contained in:
@@ -1987,14 +1987,14 @@ class AdminController
|
||||
$home_route = $config->get('system.home.alias');
|
||||
$topParent = $obj->topParent();
|
||||
if (isset($topParent)) {
|
||||
if ($topParent->route() == $home_route) {
|
||||
$route = (string)$topParent->route() . $route;
|
||||
$top_parent_route = (string)$topParent->route();
|
||||
if ($top_parent_route == $home_route && substr($route, 0, strlen($top_parent_route) + 1) != ($top_parent_route . '/')) {
|
||||
$route = $top_parent_route . $route;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$redirect_url = '/' . ($multilang ? ($obj->language()) : '') . $admin_route . '/' . $this->view . $route;
|
||||
|
||||
$redirect_url = ($multilang ? '/' . $obj->language() : '') . $admin_route . '/' . $this->view . $route;
|
||||
$this->setRedirect($redirect_url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user