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

Commit

Permalink
correction pagination v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bsauveton committed Jan 11, 2016
1 parent 05cda7e commit 0ac4f63
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions www/include/common/autoNumLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,38 @@
* For more information : [email protected]
*
*/
if (!isset($centreon))
exit();

if (isset($_POST["limit"]) && $_POST["limit"])
$limit = $_POST["limit"];
else if (isset($_GET["limit"]))
$limit = $_GET["limit"];
else if (!isset($_POST["limit"]) && !isset($_GET["limit"]) && isset($centreon->historyLimit[$url]))
$limit = $centreon->historyLimit[$url];
else {
if (($p >= 200 && $p < 300) || ($p >= 20000 && $p < 30000)){
$DBRESULT = $pearDB->query("SELECT * FROM `options` WHERE `key` = 'maxViewMonitoring'");
$gopt = $DBRESULT->fetchRow();
$limit = myDecode($gopt["value"]);
} else {
$DBRESULT = $pearDB->query("SELECT * FROM `options` WHERE `key` = 'maxViewConfiguration'");
$gopt = $DBRESULT->fetchRow();
$limit = myDecode($gopt["value"]);
}
if (!isset($centreon)) {
exit();
}

if (!empty($centreon->historyLimit) && $limit != $centreon->historyLimit[$url]) {
if (isset($_POST["limit"]) && $_POST["limit"]) {
$limit = $_POST["limit"];
} else if (isset($_GET["limit"])) {
$limit = $_GET["limit"];
} else if (!isset($_POST["limit"]) && !isset($_GET["limit"]) && isset($centreon->historyLimit[$url])) {
$limit = $centreon->historyLimit[$url];
} else {
if (($p >= 200 && $p < 300) || ($p >= 20000 && $p < 30000)){
$DBRESULT = $pearDB->query("SELECT * FROM `options` WHERE `key` = 'maxViewMonitoring'");
$gopt = $DBRESULT->fetchRow();
$limit = myDecode($gopt["value"]);
} else {
$DBRESULT = $pearDB->query("SELECT * FROM `options` WHERE `key` = 'maxViewConfiguration'");
$gopt = $DBRESULT->fetchRow();
$limit = myDecode($gopt["value"]);
}
}
if (!empty($centreon->historyLimit) && !empty($centreon->historyLimit[$url]) && $limit != $centreon->historyLimit[$url]) {
$num = 0;
} else if (isset($_POST["num"]) && $_POST["num"]) {
$num = $_POST["num"];
$num = $_POST["num"];
} else if (isset($_GET["num"]) && $_GET["num"]) {
$num = $_GET["num"];
$num = $_GET["num"];
} else if (!isset($_POST["num"]) && !isset($_GET["num"]) && isset($centreon->historyPage[$url])) {
$num = $centreon->historyPage[$url];
} else {
$num = 0;
}
$num = 0;
}

global $search;
?>

0 comments on commit 0ac4f63

Please sign in to comment.