mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/nginx: code style issue
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 Fabian Franz
|
||||
* All rights reserved.
|
||||
@@ -27,6 +28,7 @@
|
||||
*/
|
||||
|
||||
require_once 'config.inc';
|
||||
|
||||
use OPNsense\Nginx\Nginx;
|
||||
use OPNsense\Nginx\ErrorLogParser;
|
||||
use OPNsense\Nginx\AccessLogParser;
|
||||
@@ -35,7 +37,6 @@ use OPNsense\Nginx\StreamAccessLogParser;
|
||||
$log_prefix = '/var/log/nginx/';
|
||||
$log_suffix = '.log';
|
||||
|
||||
|
||||
if ($_SERVER['argc'] != 3) {
|
||||
die('{"error": "Incorrect amount of parameters given"}');
|
||||
}
|
||||
@@ -67,7 +68,7 @@ switch ($mode) {
|
||||
$log_file_name = $log_prefix . basename($server_names) . '.' . $mode . $log_suffix;
|
||||
// this entry has no log file, ignore it
|
||||
if (!file_exists($log_file_name)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
$logparser = null;
|
||||
|
||||
@@ -78,7 +79,7 @@ switch ($mode) {
|
||||
}
|
||||
// we cannot parse the file - something went wrong
|
||||
if ($logparser == null) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
$lines = array_merge($lines, $logparser->get_result());
|
||||
if (empty($lines)) {
|
||||
@@ -108,7 +109,7 @@ switch ($mode) {
|
||||
}
|
||||
// we cannot parse the file - something went wrong
|
||||
if ($logparser == null) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
$lines = array_merge($lines, $logparser->get_result());
|
||||
if (empty($lines)) {
|
||||
|
||||
Reference in New Issue
Block a user