X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Ffront%2Fcontroller%2Fadmin%2FPluginsController.php;h=8e05968199df9e099b61d16c7a3c9494a6e3a672;hb=98e7a59ca21b51cbd86d09cd5d217c0c8bf3db77;hp=1eb7e6357a346dd7e889c0ba4b89ff0c58994102;hpb=8e9169cebaf5697344cb373d69fe429e8e0efd5d;p=github%2Fshaarli%2FShaarli.git diff --git a/application/front/controller/admin/PluginsController.php b/application/front/controller/admin/PluginsController.php index 1eb7e635..8e059681 100644 --- a/application/front/controller/admin/PluginsController.php +++ b/application/front/controller/admin/PluginsController.php @@ -58,10 +58,11 @@ class PluginsController extends ShaarliAdminController try { $parameters = $request->getParams() ?? []; - $this->executeHooks($parameters); + $this->executePageHooks('save_plugin_parameters', $parameters); if (isset($parameters['parameters_form'])) { unset($parameters['parameters_form']); + unset($parameters['token']); foreach ($parameters as $param => $value) { $this->container->conf->set('plugins.'. $param, escape($value)); } @@ -81,19 +82,4 @@ class PluginsController extends ShaarliAdminController return $this->redirect($response, '/admin/plugins'); } - - /** - * @param mixed[] $data Variables passed to the template engine - * - * @return mixed[] Template data after active plugins render_picwall hook execution. - */ - protected function executeHooks(array $data): array - { - $this->container->pluginManager->executeHooks( - 'save_plugin_parameters', - $data - ); - - return $data; - } }