net/ftp-proxy: Fix php errors in ServiceController (#4131)

This commit is contained in:
Monviech 2024-07-29 21:09:27 +02:00 committed by GitHub
parent 733cb0649d
commit f6116580ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 19 deletions

View file

@ -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

View file

@ -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";