mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/ftp-proxy: Fix php errors in ServiceController (#4131)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
-18
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user