Source
$data['alert_usrgrp_data'] = CArrayHelper::renameObjectsKeys($data['alert_usrgrp_data'], ['usrgrpid' => 'id']);
<?php
/*
** Zabbix
** Copyright (C) 2001-2024 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.
**/
class CControllerMiscConfigEdit extends CController {
protected function init() {
$this->disableSIDValidation();
}
protected function checkInput() {
$fields = [
'url' => 'db config.url',
'discovery_groupid' => 'db config.discovery_groupid',
'default_inventory_mode' => 'db config.default_inventory_mode',
'alert_usrgrpid' => 'db config.alert_usrgrpid',
'snmptrap_logging' => 'db config.snmptrap_logging',
'login_attempts' => 'db config.login_attempts',
'login_block' => 'db config.login_block',
'validate_uri_schemes' => 'db config.validate_uri_schemes',
'uri_valid_schemes' => 'db config.uri_valid_schemes',
'x_frame_header_enabled' => 'in 0,1',
'x_frame_options' => 'db config.x_frame_options',
'iframe_sandboxing_enabled' => 'db config.iframe_sandboxing_enabled',
'iframe_sandboxing_exceptions' => 'db config.iframe_sandboxing_exceptions',
'socket_timeout' => 'db config.socket_timeout',
'connect_timeout' => 'db config.connect_timeout',
'media_type_test_timeout' => 'db config.media_type_test_timeout',
'script_timeout' => 'db config.script_timeout',
'item_test_timeout' => 'db config.item_test_timeout',
'report_test_timeout' => 'db config.report_test_timeout'
];
$ret = $this->validateInput($fields);
if (!$ret) {
$this->setResponse(new CControllerResponseFatal());
}
return $ret;
}
protected function checkPermissions() {
return $this->checkAccess(CRoleHelper::UI_ADMINISTRATION_GENERAL);
}