Source
static void DBpatch_widget_from_screen_item(zbx_db_screen_item_t *si, zbx_db_widget_t *w, zbx_vector_ptr_t *fields)
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/*
* 5.2 development database patches
*/
static int DBpatch_5010000(void)
{
const zbx_db_field_t field = {"default_lang", "en_GB", NULL, NULL, 5, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBadd_field("config", &field);
}
static int DBpatch_5010001(void)
{
const zbx_db_field_t field = {"lang", "default", NULL, NULL, 7, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBmodify_field_type("users", &field, NULL);
}
static int DBpatch_5010002(void)
{
if (ZBX_DB_OK > zbx_db_execute("update users set lang='default',theme='default' where alias='guest'"))
return FAIL;
return SUCCEED;
}
static int DBpatch_5010003(void)
{
if (0 == (DBget_program_type() & ZBX_PROGRAM_TYPE_SERVER))
return SUCCEED;
if (ZBX_DB_OK > zbx_db_execute(
"delete from profiles "
"where idx in ('web.latest.toggle','web.latest.toggle_other')"))
return FAIL;
return SUCCEED;
}
static int DBpatch_5010004(void)
{