mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-09 00:42:34 -04:00
net/ftp-proxy: Fix php errors in ServiceController (#4131)
This commit is contained in:
parent
733cb0649d
commit
f6116580ac
2 changed files with 1 additions and 19 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in a new issue