mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-09 00:35:53 +02:00
- Add locator where need.
- Fix the switch expert/normal issue into pages edit panel. - Set default page mode to normal.
This commit is contained in:
@@ -129,7 +129,7 @@ class AdminPlugin extends Plugin
|
||||
$home = '/' . trim($this->config->get('system.home.alias'), '/');
|
||||
|
||||
// set the default if not set before
|
||||
$this->session->expert = $this->session->expert ?: true;
|
||||
$this->session->expert = $this->session->expert ?: false;
|
||||
|
||||
// set session variable if it's passed via the url
|
||||
if ($this->uri->param('mode') == 'expert') {
|
||||
@@ -143,12 +143,16 @@ class AdminPlugin extends Plugin
|
||||
|
||||
$this->grav['admin']->routes = $pages->routes();
|
||||
|
||||
// Remove default route from routes.
|
||||
if (isset($this->grav['admin']->routes[$this->grav['config']->get('system.home.alias')])) {
|
||||
unset($this->grav['admin']->routes[$this->grav['config']->get('system.home.alias')]);
|
||||
}
|
||||
|
||||
$pages->dispatch('/', true)->route($home);
|
||||
|
||||
// Make local copy of POST.
|
||||
$post = !empty($_POST) ? $_POST : array();
|
||||
|
||||
|
||||
// Handle tasks.
|
||||
$this->admin->task = $task = !empty($post['task']) ? $post['task'] : $this->uri->param('task');
|
||||
if ($task) {
|
||||
|
||||
Reference in New Issue
Block a user