From cecee27688cfcc136d846b87a332ea8cde87d4cc Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 4 Feb 2021 17:47:57 +0100 Subject: [PATCH] intrusion detection: style sweep --- .../OPNsense/IDS/Api/SettingsController.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php b/src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php index 591775078..9064d8cb3 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php @@ -528,7 +528,6 @@ class SettingsController extends ApiMutableModelControllerBase { $result = array("result" => "failed"); if ($this->request->isPost() && $this->request->hasPost("action")) { - $this->sessionClose(); if ($this->request->hasPost('enabled')) { $this->toggleRuleAction($sid, $this->request->getPost("enabled", "int", null)); @@ -768,16 +767,15 @@ class SettingsController extends ApiMutableModelControllerBase // changing some rules by sid doesn't matter, a lot inflates the config.xml beyond reasonable limits. $result['status'] = 'warning'; $result['message'] = sprintf( - gettext("We strongly advise to use policies instead of ". - "single rule based changes to limit the size of the configuration. " . - "A list of all manual changes can be revised in the policy editor (available %s here %s)" - ), - "", "" + gettext("We strongly advise to use policies instead of " . + "single rule based changes to limit the size of the configuration. " . + "A list of all manual changes can be revised in the policy editor (available %s here %s)"), + "", + "" ); } // return unescaped content $this->response->setContentType('application/json', 'UTF-8'); $this->response->setContent(json_encode($result)); } - }