Merge branch 'support/2.7' into develop

# Conflicts:
#	README.md
#	composer.json
#	composer.lock
#	core/cmdbsource.class.inc.php
#	core/dbobject.class.php
#	datamodels/2.x/combodo-db-tools/db_analyzer.class.inc.php
#	datamodels/2.x/combodo-db-tools/dbtools.php
#	datamodels/2.x/combodo-db-tools/dictionaries/zh_cn.dict.combodo-db-tools.php
#	datamodels/2.x/itop-attachments/dictionaries/zh_cn.dict.itop-attachments.php
#	datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
#	dictionaries/zh_cn.dictionary.itop.core.php
#	dictionaries/zh_cn.dictionary.itop.ui.php
#	lib/composer/InstalledVersions.php
#	lib/composer/autoload_classmap.php
#	lib/composer/autoload_static.php
#	lib/composer/installed.php
#	lib/composer/platform_check.php
#	pages/ajax.render.php
#	pages/csvimport.php
#	setup/ajax.dataloader.php
#	setup/index.php
#	setup/setuputils.class.inc.php
#	test/application/UtilsTest.php
This commit is contained in:
Pierre Goiffon
2021-06-14 16:19:56 +02:00
65 changed files with 3743 additions and 3485 deletions

View File

@@ -242,6 +242,79 @@ class AjaxRenderController
$aColumns = utils::ReadParam('columns', array(), false, 'raw_data');
$aClassAliases = utils::ReadParam('class_aliases', array());
foreach ($aColumns as $sClass => $aAttCodes) {
foreach ($aAttCodes as $sAttCode => $aAttProperties) {
if (!array_key_exists('checked', $aAttProperties)) {
/**
* For data passed in XHR queries with some volume, on some servers data can be cut off because of a php.ini's `max_input_vars` set too low
*
* Normal format is :
* ```
* array (
* 'UserRequest' =>
* array (
* '_key_' =>
* array (
* 'label' => 'User Request (Link)',
* 'checked' => 'true',
* 'disabled' => 'true',
* 'alias' => 'UserRequest',
* 'code' => '_key_',
* 'sort' => 'none',
* ),
* // ...
* 'parent_request_id_friendlyname' =>
* array (
* 'label' => 'parent_request_id_friendlyname (Friendly Name)',
* 'checked' => 'false',
* 'disabled' => 'false',
* 'alias' => 'UserRequest',
* 'code' => 'parent_request_id_friendlyname',
* 'sort' => 'none',
* ),
* )
* ```
*
* While with a low max_input_vars we can get :
* ```
* array (
* 'UserRequest' =>
* array (
* '_key_' =>
* array (
* 'label' => 'User Request (Link)',
* 'checked' => 'true',
* 'disabled' => 'true',
* 'alias' => 'UserRequest',
* 'code' => '_key_',
* 'sort' => 'none',
* ),
* // ...
* 'parent_request_id_friendlyname' =>
* array (
* 'label' => 'parent_request_id_friendlyname (Friendly Name)',
* ),
* )
* ```
*
* @link https://www.php.net/manual/fr/info.configuration.php#ini.max-input-vars PHP doc on `max_input_vars`
* @link https://www.itophub.io/wiki/page?id=latest%3Ainstall%3Aphp_and_mysql_configuration#php_mysql_mariadb_settings Combodo's recommended options
*/
$iMaxInputVarsValue = ini_get('max_input_vars');
IssueLog::Warning(
"ajax.render.php received an invalid array for columns : check max_input_vars value in php.ini !",
null,
array(
'controller' => '\Combodo\iTop\Controller\AjaxRenderController::Search',
'max_input_vars' => $iMaxInputVarsValue,
'class.attcode with invalid format' => "$sClass.$sAttCode",
)
);
$aColumns[$sClass][$sAttCode]['checked'] = 'false';
}
}
}
// Filter the list to removed linked set since we are not able to display them here
$sIdName = "";
$aOrderBy = array();