]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/admin/PluginsController.php
Merge pull request #1539 from ArthurHoaro/feature/manual-root-url
[github/shaarli/Shaarli.git] / application / front / controller / admin / PluginsController.php
index 1eb7e6357a346dd7e889c0ba4b89ff0c58994102..8e05968199df9e099b61d16c7a3c9494a6e3a672 100644 (file)
@@ -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;
-    }
 }