Private GIT

Skip to content
Snippets Groups Projects
Commit 2f0188fe authored by Laurent Pinsivy's avatar Laurent Pinsivy Committed by loiclau
Browse files

Host search not saved when activate/desactivate a host

parent c6d37a94
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,9 @@ $DBRESULT->free(); ...@@ -64,7 +64,9 @@ $DBRESULT->free();
if (isset($_POST["searchH"])) { if (isset($_POST["searchH"])) {
$search = $_POST["searchH"]; $search = $_POST["searchH"];
$_POST["search"] = $_POST["searchH"]; $centreon->historySearch[$url] = $search;
} elseif (isset($_GET["searchH"])) {
$search = $_GET["searchH"];
$centreon->historySearch[$url] = $search; $centreon->historySearch[$url] = $search;
} elseif (isset($centreon->historySearch[$url])) { } elseif (isset($centreon->historySearch[$url])) {
$search = $centreon->historySearch[$url]; $search = $centreon->historySearch[$url];
...@@ -269,9 +271,9 @@ for ($i = 0; $host = $DBRESULT->fetchRow(); $i++) { ...@@ -269,9 +271,9 @@ for ($i = 0; $host = $DBRESULT->fetchRow(); $i++) {
$selectedElements = $form->addElement('checkbox', "select[".$host['host_id']."]"); $selectedElements = $form->addElement('checkbox', "select[".$host['host_id']."]");
if ($host["host_activate"]) { 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 { } 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>"; $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>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment