mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 14:36:22 +02:00
Fixed issue with admin page using default expires, now forces 0 #1009
This commit is contained in:
@@ -390,11 +390,15 @@ class AdminPlugin extends Plugin
|
||||
$this->grav['page'] = function () use ($self) {
|
||||
$page = new Page;
|
||||
|
||||
$page->expires(0);
|
||||
|
||||
// If the page cannot be found in other plugins, try looking in admin plugin itself.
|
||||
if (file_exists(__DIR__ . "/pages/admin/{$self->template}.md")) {
|
||||
$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md"));
|
||||
$page->slug(basename($self->template));
|
||||
|
||||
|
||||
|
||||
return $page;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user