From f6116580ac32a2bce3e708361b3ba8258adb8de4 Mon Sep 17 00:00:00 2001 From: Monviech <79600909+Monviech@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:09:27 +0200 Subject: [PATCH] net/ftp-proxy: Fix php errors in ServiceController (#4131) --- net/ftp-proxy/Makefile | 2 +- .../FtpProxy/Api/ServiceController.php | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/net/ftp-proxy/Makefile b/net/ftp-proxy/Makefile index 78c8fc10b..4f655e4ba 100644 --- a/net/ftp-proxy/Makefile +++ b/net/ftp-proxy/Makefile @@ -1,6 +1,6 @@ PLUGIN_NAME= ftp-proxy PLUGIN_VERSION= 1.0 -PLUGIN_REVISION= 3 +PLUGIN_REVISION= 4 PLUGIN_COMMENT= Control ftp-proxy processes PLUGIN_MAINTAINER= frank.brendel@eurolog.com diff --git a/net/ftp-proxy/src/opnsense/mvc/app/controllers/OPNsense/FtpProxy/Api/ServiceController.php b/net/ftp-proxy/src/opnsense/mvc/app/controllers/OPNsense/FtpProxy/Api/ServiceController.php index 6bc2f5853..dec43eeac 100644 --- a/net/ftp-proxy/src/opnsense/mvc/app/controllers/OPNsense/FtpProxy/Api/ServiceController.php +++ b/net/ftp-proxy/src/opnsense/mvc/app/controllers/OPNsense/FtpProxy/Api/ServiceController.php @@ -41,9 +41,6 @@ class ServiceController extends ApiControllerBase public function statusAction($uuid) { $result = array("result" => "failed", "function" => "status"); - if ($this->request->isPost()) { - $this->sessionClose(); - } if ($uuid != null) { $mdlFtpProxy = new FtpProxy(); $node = $mdlFtpProxy->getNodeByReference('ftpproxy.' . $uuid); @@ -62,9 +59,6 @@ class ServiceController extends ApiControllerBase public function startAction($uuid) { $result = array("result" => "failed", "function" => "start"); - if ($this->request->isPost()) { - $this->sessionClose(); - } if ($uuid != null) { $mdlFtpProxy = new FtpProxy(); $node = $mdlFtpProxy->getNodeByReference('ftpproxy.' . $uuid); @@ -83,9 +77,6 @@ class ServiceController extends ApiControllerBase public function stopAction($uuid) { $result = array("result" => "failed", "function" => "stop"); - if ($this->request->isPost()) { - $this->sessionClose(); - } if ($uuid != null) { $mdlFtpProxy = new FtpProxy(); $node = $mdlFtpProxy->getNodeByReference('ftpproxy.' . $uuid); @@ -103,9 +94,6 @@ class ServiceController extends ApiControllerBase */ public function restartAction($uuid) { - if ($this->request->isPost()) { - $this->sessionClose(); - } if ($uuid != null) { $mdlFtpProxy = new FtpProxy(); $node = $mdlFtpProxy->getNodeByReference('ftpproxy.' . $uuid); @@ -123,9 +111,6 @@ class ServiceController extends ApiControllerBase public function configAction() { $result = array("result" => "failed", "function" => "config"); - if ($this->request->isPost()) { - $this->sessionClose(); - } $result['result'] = $this->callBackend('template'); return $result; } @@ -136,9 +121,6 @@ class ServiceController extends ApiControllerBase */ public function reloadAction() { - if ($this->request->isPost()) { - $this->sessionClose(); - } $result = $this->configAction(); if ($result['result'] == 'OK') { $result['function'] = "reload";