Private GIT

Skip to content
Snippets Groups Projects
Commit 5dc1d6c7 authored by Laurent Pinsivy's avatar Laurent Pinsivy Committed by Guillaume28
Browse files

Allow to use "min" in url with autologin - #5338

parent 30a9c51a
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,10 @@ if (isset($_POST["centreon_token"]) ...@@ -54,6 +54,10 @@ if (isset($_POST["centreon_token"])
$_GET["p"] = $_POST["p"]; $_GET["p"] = $_POST["p"];
} }
if (isset($_POST['min'])) {
$_GET["min"] = $_POST["min"];
}
/* /*
* Check first for Autologin or Get Authentication * Check first for Autologin or Get Authentication
*/ */
...@@ -103,10 +107,14 @@ if (isset($_POST["centreon_token"]) ...@@ -103,10 +107,14 @@ if (isset($_POST["centreon_token"])
array(session_id(), $centreon->user->user_id, '1', time(), $_SERVER["REMOTE_ADDR"]) array(session_id(), $centreon->user->user_id, '1', time(), $_SERVER["REMOTE_ADDR"])
); );
if (!isset($_POST["submit"])) { if (!isset($_POST["submit"])) {
$minimize = '';
if (isset ($_GET["min"]) && $_GET["min"] == '1') {
$minimize = '&min=1';
}
if (isset ($_GET["p"]) && $_GET["p"] != '') { if (isset ($_GET["p"]) && $_GET["p"] != '') {
header('Location: main.php?p=' . $_GET["p"]); header('Location: main.php?p='.$_GET["p"].$minimize);
} else if (isset($centreon->user->default_page) && $centreon->user->default_page != '') { } else if (isset($centreon->user->default_page) && $centreon->user->default_page != '') {
header('Location: main.php?p=' . $centreon->user->default_page); header('Location: main.php?p='.$centreon->user->default_page.$minimize);
} else { } else {
header('Location: main.php'); header('Location: main.php');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment