Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Add system_default value for date and time format settings #2289

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -16131,7 +16131,7 @@
" ('" SETTING_UUID_USER_INTERFACE_TIME_FORMAT "', NULL,"
" 'User Interface Time Format',"
" 'Preferred time format to be used in client user interfaces.',"
" '24' );");
" 'system_default' );");

if (sql_int ("SELECT count(*) FROM settings"
" WHERE uuid = '" SETTING_UUID_USER_INTERFACE_DATE_FORMAT "'"
Expand All @@ -16142,7 +16142,7 @@
" ('" SETTING_UUID_USER_INTERFACE_DATE_FORMAT "', NULL,"
" 'User Interface Date Format',"
" 'Preferred date format to be used in client user interfaces.',"
" 'wdmy' );");
" 'system_default' );");
}

/**
Expand Down Expand Up @@ -53348,10 +53348,9 @@

if (strcmp (uuid, "11deb7ff-550b-4950-aacf-06faeb7c61b9") == 0)
{
int value_int;
/* User Interface Time Format */
if (sscanf (value, "%d", &value_int) != 1
|| (strcmp (value, "12") && strcmp (value, "24")))
if (strcmp (value, "12") && strcmp (value, "24")
&& strcmp (value, "system_default"))

Check warning on line 53353 in src/manage_sql.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql.c#L53353

Added line #L53353 was not covered by tests
{
g_free (value);
return 2;
Expand All @@ -53361,7 +53360,8 @@
if (strcmp (uuid, "d9857b7c-1159-4193-9bc0-18fae5473a69") == 0)
{
/* User Interface Date Format */
if (strcmp (value, "wmdy") && strcmp (value, "wdmy"))
if (strcmp (value, "wmdy") && strcmp (value, "wdmy")
&& strcmp (value, "system_default"))

Check warning on line 53364 in src/manage_sql.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql.c#L53364

Added line #L53364 was not covered by tests
{
g_free (value);
return 2;
Expand Down
Loading