Fixed images from plugins/themes disappearing when saving twice

This commit is contained in:
Matias Griese
2021-09-28 13:41:38 +03:00
parent 25f2028a9d
commit 29157a3011
4 changed files with 99 additions and 61 deletions

View File

@@ -56,6 +56,7 @@ class AdminController extends AdminBaseController
public function initialize(Grav $grav = null, $view = null, $task = null, $route = null, $post = null)
{
$this->grav = $grav;
$this->admin = $this->grav['admin'];
$this->view = $view;
$this->task = $task ?: 'display';
if (isset($post['data'])) {
@@ -67,7 +68,6 @@ class AdminController extends AdminBaseController
}
$this->post = $this->getPost($post);
$this->route = $route;
$this->admin = $this->grav['admin'];
$this->grav->fireEvent('onAdminControllerInit', new Event(['controller' => &$this]));
}