mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 02:26:23 +02:00
Add onAdminSave() even to taskSaveAs() #1544
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# v1.8.15
|
||||
## mm/dd/2018
|
||||
|
||||
1. [](#improved)
|
||||
* Fire `onAdminSave()` event during `AdminController::taskSaveAs()` [#1544](https://github.com/getgrav/grav-plugin-admin/issues/1544)
|
||||
1. [](#bugfix)
|
||||
* Clean user post to ensure dynamically added form fields are not saved
|
||||
|
||||
|
||||
@@ -2361,9 +2361,10 @@ class AdminController extends AdminBaseController
|
||||
$aPage->template($obj->template());
|
||||
$aPage->validate();
|
||||
$aPage->filter();
|
||||
$aPage->save();
|
||||
|
||||
$this->grav->fireEvent('onAdminAfterSave', new Event(['page' => $obj]));
|
||||
$this->grav->fireEvent('onAdminSave', new Event(['page' => &$aPage]));
|
||||
$aPage->save();
|
||||
$this->grav->fireEvent('onAdminAfterSave', new Event(['page' => $aPage]));
|
||||
}
|
||||
|
||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_SWITCHED_LANGUAGE'), 'info');
|
||||
|
||||
Reference in New Issue
Block a user