mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
Updated taskSave to ensure route is prefixed with a forward slash
This commit is contained in:
@@ -1185,6 +1185,9 @@ class AdminController
|
||||
$route = !isset($data['route']) ? dirname($this->admin->route) : $data['route'];
|
||||
$obj = $this->admin->page(true);
|
||||
|
||||
// Ensure route is prefixed with a forward slash.
|
||||
$route = '/' . ltrim($route, '/');
|
||||
|
||||
if (isset($data['frontmatter']) && !$this->checkValidFrontmatter($data['frontmatter'])) {
|
||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.INVALID_FRONTMATTER_COULD_NOT_SAVE'), 'error');
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user