Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
style and psr2
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed May 3, 2019
1 parent b65bd87 commit 693dfb3
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 74 deletions.
12 changes: 6 additions & 6 deletions www/include/monitoring/status/Hosts/hostJS.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -37,16 +37,16 @@
exit();
}

if (!isset($centreon->optGen["AjaxFirstTimeReloadMonitoring"]) ||
$centreon->optGen["AjaxFirstTimeReloadMonitoring"] == 0
if (!isset($centreon->optGen["AjaxFirstTimeReloadMonitoring"])
|| $centreon->optGen["AjaxFirstTimeReloadMonitoring"] == 0
) {
$tFM = 10;
} else {
$tFM = $centreon->optGen["AjaxFirstTimeReloadMonitoring"] * 1000;
}

if (!isset($centreon->optGen["AjaxFirstTimeReloadStatistic"]) ||
$centreon->optGen["AjaxFirstTimeReloadStatistic"] == 0
if (!isset($centreon->optGen["AjaxFirstTimeReloadStatistic"])
|| $centreon->optGen["AjaxFirstTimeReloadStatistic"] == 0
) {
$tFS = 10;
} else {
Expand Down
4 changes: 2 additions & 2 deletions www/include/monitoring/status/Services/serviceJS.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2010 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down
40 changes: 20 additions & 20 deletions www/include/monitoring/status/monitoringHost.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
Expand Down Expand Up @@ -59,11 +59,11 @@
$param = $_GET;
}

if (isset($param["cmd"]) &&
$param["cmd"] == 14 &&
isset($param["author"]) &&
isset($param["en"]) &&
$param["en"] == 1
if (isset($param["cmd"])
&& $param["cmd"] == 14
&& isset($param["author"])
&& isset($param["en"])
&& $param["en"] == 1
) {
if (!isset($param["sticky"])) {
$param["sticky"] = 0;
Expand All @@ -78,11 +78,11 @@
$param["ackhostservice"] = 0;
}
acknowledgeHost($param);
} elseif (isset($param["cmd"]) &&
$param["cmd"] == 14 &&
isset($param["author"]) &&
isset($param["en"]) &&
$param["en"] == 0
} elseif (isset($param["cmd"])
&& $param["cmd"] == 14
&& isset($param["author"])
&& isset($param["en"])
&& $param["en"] == 0
) {
acknowledgeHostDisable();
}
Expand All @@ -94,7 +94,7 @@
if ($min) {
switch ($o) {
default:
require_once($pathTools . "tools.php");
require_once $pathTools . "tools.php";
break;
}
} else {
Expand All @@ -104,25 +104,25 @@
if ($continue) {
switch ($o) {
case "h":
require_once($path . "host.php");
require_once $path . "host.php";
break;
case "hpb":
require_once($path . "host.php");
require_once $path . "host.php";
break;
case "h_unhandled":
require_once($path . "host.php");
require_once $path . "host.php";
break;
case "hd":
require_once($pathDetails . "hostDetails.php");
require_once $pathDetails . "hostDetails.php";
break;
case "hpc":
require_once("./include/monitoring/submitPassivResults/hostPassiveCheck.php");
require_once "./include/monitoring/submitPassivResults/hostPassiveCheck.php";
break;
case "hak":
require_once($pathRoot . "acknowlegement/hostAcknowledge.php");
require_once $pathRoot . "acknowlegement/hostAcknowledge.php";
break;
default:
require_once($path . "host.php");
require_once $path . "host.php";
break;
}
}
Expand Down
91 changes: 45 additions & 46 deletions www/include/monitoring/status/monitoringService.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/*
* Copyright 2005-2018 Centreon
* Copyright 2005-2019 Centreon
* Centreon is developed by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
Expand Down Expand Up @@ -54,48 +53,48 @@



if (!isset($_GET["cmd"]) &&
isset($_POST["cmd"])
if (!isset($_GET["cmd"])
&& isset($_POST["cmd"])
) {
$param = $_POST;
} else {
$param = $_GET;
}

if (isset($param["cmd"]) &&
$param["cmd"] == 15 &&
isset($param["author"]) &&
isset($param["en"]) &&
$param["en"] == 1
if (isset($param["cmd"])
&& $param["cmd"] == 15
&& isset($param["author"])
&& isset($param["en"])
&& $param["en"] == 1
) {
if (!isset($param["sticky"]) ||
!in_array($param["sticky"], array('0', '1'))
if (!isset($param["sticky"])
|| !in_array($param["sticky"], array('0', '1'))
) {
$param["sticky"] = '0';
}
if (!isset($param["notify"]) ||
!in_array($param["notify"], array('0', '1'))
if (!isset($param["notify"])
|| !in_array($param["notify"], array('0', '1'))
) {
$param["notify"] = '0';
}
if (!isset($param["persistent"]) ||
!in_array($param["persistent"], array('0', '1'))
if (!isset($param["persistent"])
|| !in_array($param["persistent"], array('0', '1'))
) {
$param["persistent"] = '0';
}
acknowledgeService($param);
} elseif (isset($param["cmd"]) &&
$param["cmd"] == 15 &&
isset($param["author"]) &&
isset($param["en"]) &&
$param["en"] == 0
} elseif (isset($param["cmd"])
&& $param["cmd"] == 15
&& isset($param["author"])
&& isset($param["en"])
&& $param["en"] == 0
) {
acknowledgeServiceDisable();
}

if (isset($param["cmd"]) &&
$param["cmd"] == 16 &&
isset($param["output"])
if (isset($param["cmd"])
&& $param["cmd"] == 16
&& isset($param["output"])
) {
submitPassiveCheck();
}
Expand Down Expand Up @@ -127,93 +126,93 @@
* View of Service
*/
case "svc":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svcpb":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_warning":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_critical":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_unknown":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_ok":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_pending":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
case "svc_unhandled":
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
/*
* Special Views
*/
case "svcd":
require_once($pathDetails . "serviceDetails.php");
require_once $pathDetails . "serviceDetails.php";
break;
case "svcak":
require_once("./include/monitoring/acknowlegement/serviceAcknowledge.php");
require_once "./include/monitoring/acknowlegement/serviceAcknowledge.php";
break;
case "svcpc":
require_once("./include/monitoring/submitPassivResults/servicePassiveCheck.php");
require_once "./include/monitoring/submitPassivResults/servicePassiveCheck.php";
break;

case "svcgrid":
require_once($svc_path . "serviceGrid.php");
require_once $svc_path . "serviceGrid.php";
break;
case "svcOV":
case "svcOV_pb":
require_once($svc_path . "serviceGrid.php");
require_once $svc_path . "serviceGrid.php";
break;
case "svcSum":
require_once($svc_path . "serviceSummary.php");
require_once $svc_path . "serviceSummary.php";
break;
/*
* View by Service Groups
*/
case "svcgridSG":
require_once($sg_path . "serviceGridBySG.php");
require_once $sg_path . "serviceGridBySG.php";
break;
case "svcOVSG":
case "svcOVSG_pb":
require_once($sg_path . "serviceGridBySG.php");
require_once $sg_path . "serviceGridBySG.php";
break;
case "svcSumSG":
require_once($sg_path . "serviceSummaryBySG.php");
require_once $sg_path . "serviceSummaryBySG.php";
break;

/*
* View By hosts groups
*/
case "svcgridHG":
require_once($hg_path . "serviceGridByHG.php");
require_once $hg_path . "serviceGridByHG.php";
break;
case "svcOVHG":
case "svcOVHG_pb":
require_once($hg_path . "serviceGridByHG.php");
require_once $hg_path . "serviceGridByHG.php";
break;
case "svcSumHG":
require_once($hg_path . "serviceSummaryByHG.php");
require_once $hg_path . "serviceSummaryByHG.php";
break;
/*
* Meta Services
*/
case "meta":
require_once($meta_path . "/metaService.php");
require_once $meta_path . "/metaService.php";
break;
/*
* Scheduling Queue
*/
case "svcSch":
require_once($path_sch . "serviceSchedule.php");
require_once $path_sch . "serviceSchedule.php";
break;
default:
require_once($svc_path . "service.php");
require_once $svc_path . "service.php";
break;
}
}

0 comments on commit 693dfb3

Please sign in to comment.