mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-05 23:30:46 +01:00
removed some double slash situations
This commit is contained in:
@@ -917,7 +917,7 @@ class AdminController
|
||||
$path = $route . '/' . $folder;
|
||||
|
||||
$this->admin->session()->{$path} = $data;
|
||||
$this->setRedirect("{$this->view}/{$path}");
|
||||
$this->setRedirect("{$this->view}/". ltrim($path, '/'));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -971,7 +971,8 @@ class AdminController
|
||||
|
||||
// Enqueue message and redirect to new location.
|
||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_COPIED'), 'info');
|
||||
$this->setRedirect($this->view . '/' . $parent->route() . '/'. $page->slug());
|
||||
$parent_route = $parent->route() ? '/' . ltrim($parent->route(), '/') : '';
|
||||
$this->setRedirect($this->view . $parent_route . '/'. $page->slug());
|
||||
|
||||
} catch (\Exception $e) {
|
||||
throw new \RuntimeException('Copying page failed on error: ' . $e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user