Source
'default_theme' => $this->getInput('default_theme', CSettingsHelper::get(CSettingsHelper::DEFAULT_THEME)),
<?php
/*
** Zabbix
** Copyright (C) 2001-2021 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 CControllerGuiEdit extends CController {
/**
* @var array
*/
protected $timezones;
protected function init() {
$this->disableSIDValidation();
$this->timezones = [
ZBX_DEFAULT_TIMEZONE => CDateTimeZoneHelper::getSystemDateTimeZone()
] + (new CDateTimeZoneHelper())->getAllDateTimeZones();
}
protected function checkInput() {
$fields = [
'default_lang' => 'db config.default_lang',
'default_timezone' => 'db config.default_timezone|in '.implode(',', array_keys($this->timezones)),
'default_theme' => 'db config.default_theme',
'search_limit' => 'db config.search_limit',
'max_overview_table_size' => 'db config.max_overview_table_size',
'max_in_table' => 'db config.max_in_table',
'server_check_interval' => 'db config.server_check_interval',
'work_period' => 'db config.work_period',
'show_technical_errors' => 'db config.show_technical_errors',
'history_period' => 'db config.history_period',
'period_default' => 'db config.period_default',
'max_period' => 'db config.max_period'
];
$ret = $this->validateInput($fields);
if (!$ret) {
$this->setResponse(new CControllerResponseFatal());
}
return $ret;
}
protected function checkPermissions() {
return $this->checkAccess(CRoleHelper::UI_ADMINISTRATION_GENERAL);