mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/nginx: cleanups and sync
This commit is contained in:
@@ -19,6 +19,7 @@ Copyright (c) 2010 Jim Pingle <jimp@pfsense.org>
|
||||
Copyright (c) 2015 Jos Schellevis
|
||||
Copyright (c) 2018 João Vilaça <machadovilaca@gmail.com>
|
||||
Copyright (c) 2019 Juergen Kellerer
|
||||
Copyright (c) 2020 Manuel Faux
|
||||
Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
|
||||
Copyright (c) 2020 Marc Leuser
|
||||
Copyright (c) 2020 Martin Wasley
|
||||
|
||||
+2
-4
@@ -169,12 +169,10 @@ class SettingsController extends ApiMutableModelControllerBase
|
||||
if ($row['enable_secrules']) {
|
||||
if ($row['enable_learning_mode']) {
|
||||
$row['waf_status'] = gettext('learning');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$row['waf_status'] = gettext('enabled');
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$row['waf_status'] = gettext('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
+3
-6
@@ -60,11 +60,9 @@ class NaxsiIdentifierConstraint extends BaseConstraint
|
||||
// 0 can only be used solely
|
||||
elseif ($intval == 0 && count($vals) > 1) {
|
||||
$validator->appendMessage(new Message(gettext("If ID 0 is specified, no other IDs can be listed."), $attribute));
|
||||
}
|
||||
elseif ($intval < 0) {
|
||||
} elseif ($intval < 0) {
|
||||
$neg++;
|
||||
}
|
||||
elseif ($intval > 0) {
|
||||
} elseif ($intval > 0) {
|
||||
$pos++;
|
||||
}
|
||||
}
|
||||
@@ -81,8 +79,7 @@ class NaxsiIdentifierConstraint extends BaseConstraint
|
||||
// Did the user try to specify multiple IDs?
|
||||
if (strpos($val, ',')) {
|
||||
$validator->appendMessage(new Message(gettext("Rules can only have a single ID."), $attribute));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$validator->appendMessage(new Message(gettext("Rule IDs need to be numeric."), $attribute));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user