Provide media object and filename in onAdminAfterDelMedia event [#1905]

This commit is contained in:
Matias Griese
2021-02-10 12:40:25 +02:00
parent 36bfa148d8
commit 6328489170
2 changed files with 2 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
* List field: added new `placement` property to decide wether to add new items at the top, bottom or based on the *position* of the clicked button [#2055](https://github.com/getgrav/grav-plugin-admin/pull/2055)
* Ensure admin default CSS styles load **first**, and presets loads **last**
* Tweaked handling of uploaded files [#1429](https://github.com/getgrav/grav-plugin-admin/issues/1429)
* Provide media object and filename in `onAdminAfterDelMedia` event [#1905](https://github.com/getgrav/grav-plugin-admin/pull/1905)
1. [](#bugfix)
* Fixed case-sensitive `accept` in `filepicker` field
* Fixed HTML Entities in titles [#2028](https://github.com/getgrav/grav-plugin-admin/issues/2028)

View File

@@ -2449,7 +2449,7 @@ class AdminController extends AdminBaseController
$page = $this->admin->page(true);
if ($page) {
// DEPRECATED: page
$this->grav->fireEvent('onAdminAfterDelMedia', new Event(['object' => $page, 'page' => $page]));
$this->grav->fireEvent('onAdminAfterDelMedia', new Event(['object' => $page, 'page' => $page, 'media' => $media, 'filename' => $filename]));
}
$this->admin->json_response = [