Source
CProfile::update('web.hostinventories.filter_field_value', getRequest('filter_field_value', ''), PROFILE_TYPE_STR);
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/hosts.inc.php';
require_once dirname(__FILE__).'/include/forms.inc.php';
$page['title'] = _('Host inventory');
$page['file'] = 'hostinventories.php';
$hostId = getRequest('hostid', 0);
require_once dirname(__FILE__).'/include/page_header.php';
// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
$fields = [
'hostid' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
// filter
'filter_set' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'filter_rst' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
'filter_field' => [T_ZBX_STR, O_OPT, null, null, null],
'filter_field_value' => [T_ZBX_STR, O_OPT, null, null, null],
'filter_exact' => [T_ZBX_INT, O_OPT, null, 'IN(0,1)', null],
'filter_groups' => [T_ZBX_INT, O_OPT, P_ONLY_ARRAY, DB_ID, null],
// actions
'cancel' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
// sort and sortorder
'sort' => [T_ZBX_STR, O_OPT, P_SYS,
IN('"name","pr_macaddress_a","pr_name","pr_os","pr_serialno_a","pr_tag","pr_type"'),
null
],
'sortorder' => [T_ZBX_STR, O_OPT, P_SYS, IN('"'.ZBX_SORT_DOWN.'","'.ZBX_SORT_UP.'"'), null]
];
check_fields($fields);
/*
* Permissions
*/
if (getRequest('hostid') && !isReadableHosts([getRequest('hostid')])) {
access_deny();
}
$sortField = getRequest('sort', CProfile::get('web.'.$page['file'].'.sort', 'name'));
$sortOrder = getRequest('sortorder', CProfile::get('web.'.$page['file'].'.sortorder', ZBX_SORT_UP));