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

Fix(configuration): Host search not saved when activate/desactivate a host #5827

Merged
merged 1 commit into from
Nov 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions www/include/configuration/configObject/host/listHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@

if (isset($_POST["searchH"])) {
$search = $_POST["searchH"];
$_POST["search"] = $_POST["searchH"];
$centreon->historySearch[$url] = $search;
} elseif (isset($_GET["searchH"])) {
$search = $_GET["searchH"];
$centreon->historySearch[$url] = $search;
} elseif (isset($centreon->historySearch[$url])) {
$search = $centreon->historySearch[$url];
Expand Down Expand Up @@ -269,9 +271,9 @@
$selectedElements = $form->addElement('checkbox', "select[".$host['host_id']."]");

if ($host["host_activate"]) {
$moptions = "<a href='main.php?p=".$p."&host_id=".$host['host_id']."&o=u&limit=".$limit."&num=".$num."&search=".$search."'><img src='img/icons/disabled.png' class='ico-14 margin_right' border='0' alt='"._("Disabled")."'></a>";
$moptions = "<a href='main.php?p=".$p."&host_id=".$host['host_id']."&o=u&limit=".$limit."&num=".$num."&searchH=".$search."'><img src='img/icons/disabled.png' class='ico-14 margin_right' border='0' alt='"._("Disabled")."'></a>";
} else {
$moptions = "<a href='main.php?p=".$p."&host_id=".$host['host_id']."&o=s&limit=".$limit."&num=".$num."&search=".$search."'><img src='img/icons/enabled.png' class='ico-14 margin_right' border='0' alt='"._("Enabled")."'></a>";
$moptions = "<a href='main.php?p=".$p."&host_id=".$host['host_id']."&o=s&limit=".$limit."&num=".$num."&searchH=".$search."'><img src='img/icons/enabled.png' class='ico-14 margin_right' border='0' alt='"._("Enabled")."'></a>";
}

$moptions .= "<input onKeypress=\"if(event.keyCode > 31 && (event.keyCode < 45 || event.keyCode > 57)) event.returnValue = false; if(event.which > 31 && (event.which < 45 || event.which > 57)) return false;\" maxlength=\"3\" size=\"3\" value='1' style=\"margin-bottom:0px;\" name='dupNbr[".$host['host_id']."]'></input>";
Expand Down