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

Commit

Permalink
Cp7 m61 fix search parameters pagination (#6348)
Browse files Browse the repository at this point in the history
* chore(build): use public repository to test

* fix(db): Some PHP warnings in strict mode

* fix(auth): Declaration of method not compatible with parent

* fix(session): Call non-static method

* Add quickform package to composer

* fix docblocks

* fix namespace of Exception class

* fix call to undeclared function \Exception()

* refactor(base): move smarty to composer managed module
remove old smarty lib and add new one to composer requirements. Update smarty plugin folder
to be outside composer module.

Resolves #CP7M-9

* refactor(base): add changed files not inserted in previous commit
Adds to: 546b316

* refactor(global): delete quickform library files

* refactor(global): remove local quickform loading

* refactor(global): fix quickform loading on Monitoring and Configuration

* refactor(global): fix quickform loading on Administration

* refactor(base): replace deprecated Archive_Zip class

replace deprecated Archive_Zip with ZipArchive class from PHP ZIP module and add composer dependency for Archive_Tar

Resolves #CP7M-13

* refactor(base): cleanup the code

* refactor(base): replace Archive_Tar with PharData

replace pear package Archive_Tar with PharData class

Resolves #CP7M-13

* refactor(global): return previous quickform class

* refactor(global): extend quickform from composer

* refactor(base): update php warnings

fix non numeric additions

part of: cp7m10

* refactor(global): cleanum cutom quickform class

* refactor(core): validate views post smarty update

Fixing various errors (not only smarty related) in validated views

Resolves CP7M-10

* Cp7 m15 fix php warnings (#6270)

* fix(base): fix some warnings and deprecations notes

fix double start a session some PHP files,
fix using of undefinded variables,
fix calling of non-static method as static,
fix using of old PEAR DB const DB_FETCHMODE_ASSOC,
remove manual loading of Smarty lib from custom views section
fix advmultiselect warnings and deprecates notes because the library is officially deprecated
fix admin ACL UI -> fix calling of undefined index and calling of non-static method as static

Resolves CP7M-15

* refactor(base): Changes to PR 6271

Update db call, fix post-merge missing db execution call on images

Resolves: CP7M10

* refactor(base): More Changes to PR 6271

Update free to closeCursor

* refactor(global): use custom quickform class (#6273)

* Cp7 m7 fix code errors and warnings (#6275)

* fix(global): remove warnings and undefined variables

* refactor(core): rework post-upgrade errors

Refactor code not compliant with php7.2

Regarding: CP7M-7

* fix(global): remove small warnings and errors

* refactor(core): call non-static method

in widgets as host-monitoring calls methods CentreonUtils::conditionBuilder and CentreonUtils::operandToMysqlFormat as static but they are non-static

Resolves CP7M-7

* fix(global): remove small warnings and errors

* refactor(core): fix warnings from tests

fix issues as "Only variables should be assigned by reference", "Undefined index", "Methods with the same name as their class will not be constructors in a future version of PHP" and etc.

Resolves CP7M-7

* fix(config): fix variable name (#6276)

Fix incorrectly pushed variable name

* fix(global): load radio buttons default value (#6280)

* Cp7 m24 migrate the installer and update (#6281)

* refactor(install): fix upgrade process

change MySQL library of php requirements and add a check for release notes file

Resolves CP7M-24

* refactor(install): add missing folder and cfg mock

add missing folder `www/install/tmp` and add mock of `www/install/install.conf.php`

Resolves CP7M-24

* refactor(install): Fix smarty and smarty-plugins loading

Resolves problem for unknown smarty plugin. Loads composer-managed smarty.

* Cp7 m7 fix code errors and warnings (#6282)

* fix(global): remove warnings and undefined variables

* refactor(core): rework post-upgrade errors

Refactor code not compliant with php7.2

Regarding: CP7M-7

* fix(global): remove small warnings and errors

* refactor(core): call non-static method

in widgets as host-monitoring calls methods CentreonUtils::conditionBuilder and CentreonUtils::operandToMysqlFormat as static but they are non-static

Resolves CP7M-7

* fix(global): remove small warnings and errors

* refactor(core): fix warnings from tests

fix issues as "Only variables should be assigned by reference", "Undefined index", "Methods with the same name as their class will not be constructors in a future version of PHP" and etc.

Resolves CP7M-7

* fix(global): use quickform and smarty from composer

* fix(global): PHP warnings, notifications and mergeWithInitialValues to return correct result

fix CentreonUtils::mergeWithInitialValues to return result from submitted data
fix PHP warinings and notifications from Host template UI
fix CentreonHosttemplates::getObjectForSelect2 attributes to be the same as the parent method

Resolves CP7M-7

* refactor(base) Fix errors found after running acceptance tests

Fix various problems caused by Smarty and Quickform, detected by acceptance tests.

Regarding CP7M7

* fix(config): fix variable name (#6276)

Fix incorrectly pushed variable name

* refactor(base): add dependency of pear-core and require newer version of PHP (#6284)

add dependency of pear-core-minimal package and requrie at least version 7 of PHP

Resolves CP7M-14

* Cp7 m27 widgets related fixes (#6293)

* fix(global): add checks to db functions and counts

* fix(global): fix PHP`s notifications and warnings

* fix(services): add monitoring fixes for warnings

* fix(global): Undefined variable: upgrade_infosTxt

in upgrade form was missing variable

Resolves CP7M-27

* fix(quickform): fix select2 default data

* refactor(quickformCustom): Change error type of addRule (#6301)

Change fatal error to notice to comply with previous version error type all over the code.

* refactor(quickFormCustom): change error type of applyfilter (#6302)

Change fatal error to notice to comply with previous version error type all over the code.

* fix(global): deprecated function, PHP notices (#6312)

replace using of deprecated each() function with foreach(),
fix several PHP notices related with undefined index

Resolves CP7M-51

* fix(quickform): add previously deleted elements (#6311)

* Cp7 m510 centreon awie (fixes) (#6313)

* fix(global): PHP 7 compatability, deprecated function, PHP notices

replace using of deprecated each() function with foreach(),
fix several PHP notices related with undefined index
fix PHP notices related to undefined index and fix CentreonObject::add compatibility with child objects
set NULL in lower case

Resolves CP7M-51

* fix(global): clean up several PHP warnings (#6314)

* fix(global): clean up several PHP warnings

fix missing variable in pagination view, upgradeForm and service host list
fix requirement of password when auth with token
set TRUE in lower case

Resolves CP7M-54

* Change quickform custom addrule returns (#6332)

* refactor(quickFormCustom): change error type of applyfilter
Change fatal error to notice to comply with previous version error type all over the code.

* refactor(quickform): update quickform custom
stop execution if element not found

* chore(build): update Jenkinsfile.

* fix(build): use /usr/bin/env in shebang instead of direct php path.

* fix(pagination,search): CP7M61 performance data

Fix pagination / search parameters get/post on administration performance data

* fix(pagination,search): CP7M61 performance data

Fix pagination / search parameters get/post on administration performance data

* remove required that got carried over from the merge
  • Loading branch information
victorvassilev authored and kduret committed Jun 20, 2018
1 parent 7854729 commit e1ca221
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
34 changes: 13 additions & 21 deletions www/include/Administration/performance/viewData.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
'num' => FILTER_SANITIZE_NUMBER_INT,
'limit' => FILTER_SANITIZE_NUMBER_INT,
'searchS' => FILTER_SANITIZE_STRING,
'search' => FILTER_SANITIZE_STRING,
'searchP' => FILTER_SANITIZE_STRING,
'o' => FILTER_SANITIZE_STRING,
'o1' => FILTER_SANITIZE_STRING,
Expand All @@ -90,34 +89,27 @@

$inputs = array();
foreach ($inputArguments as $argumentName => $argumentValue) {
if (!is_null($inputGet[$argumentName]) && trim($inputGet[$argumentName]) != '') {
$inputs[$argumentName] = $inputGet[$argumentName];
} else {
if (!is_null($inputPost[$argumentName]) && trim($inputPost[$argumentName]) != '') {
$inputs[$argumentName] = $inputPost[$argumentName];
} else {
$inputs[$argumentName] = $inputGet[$argumentName];
}
}


if (isset($inputs["searchH"])) {
$searchH = $inputs["searchH"];
if (isset($oreon->historySearch[$url]) && $oreon->historySearch[$url] != $searchH) {
$num = 0;
$oreon->historySearch[$url] = $searchH;
}
} elseif (isset($oreon->historySearch[$url])) {
$searchH = $oreon->historySearch[$url];
if (isset($_POST["searchH"])){
$num = 0;
$searchH = $_POST["searchH"];
} elseif (isset($_GET['searchH'])) {
$searchH = $_GET['searchH'];
} else {
$searchH = null;
}

if (isset($inputs["searchS"])) {
$searchS = $inputs["searchS"];
if (isset($oreon->historySearchService[$url]) && $oreon->historySearchService[$url] != $searchS) {
$num = 0;
$oreon->historySearchService[$url] = $searchS;
}
} elseif (isset($oreon->historySearchService[$url])) {
$searchS = $oreon->historySearchService[$url];
if (isset($_POST["searchS"])){
$num = 0;
$searchS = $_POST["searchS"];
} elseif (isset($_GET['searchS'])) {
$searchS = $_GET['searchS'];
} else {
$searchS = null;
}
Expand Down
16 changes: 16 additions & 0 deletions www/include/common/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,22 @@
$url_var .= '&hostgroups=' . $_REQUEST['hostgroups'];
}

/* Start Fix for performance management under administration - parameters */
if (isset($_REQUEST['searchS'])) {
$url_var .= '&searchS=' . $_REQUEST['searchS'];
if (isset($_POST['num'])){
$num = 0;
}
}

if (isset($_REQUEST['searchH'])) {
$url_var .= '&searchH=' . $_REQUEST['searchH'];
if (isset($_POST['num'])){
$num = 0;
}
}
/* End Fix for performance management under administration - parameters */

if (!isset($path)) {
$path = null;
}
Expand Down

0 comments on commit e1ca221

Please sign in to comment.