Calendar start day

Allow customising the calendar to start on a Monday instead of Sunday
This commit is contained in:
Marcus Hill
2024-05-26 23:38:50 +01:00
parent 5210fae3ec
commit fbc87572e9
6 changed files with 48 additions and 10 deletions

View File

@@ -144,11 +144,18 @@ if (isset($_POST['edit_your_user_password'])) {
header('Location: post.php?logout');
}
if (isset($_POST['edit_your_user_browser_extention'])) {
if (isset($_POST['edit_your_user_preferences'])) {
// CSRF Check
validateCSRFToken($_POST['csrf_token']);
$calendar_first_day = intval($_POST['calendar_first_day']);
// Calendar
if (isset($calendar_first_day)) {
mysqli_query($mysqli, "UPDATE user_settings SET user_config_calendar_first_day = $calendar_first_day WHERE user_id = $session_user_id");
}
// Enable extension access, only if it isn't already setup (user doesn't have cookie)
if (isset($_POST['extension']) && $_POST['extension'] == 'Yes') {
if (!isset($_COOKIE['user_extension_key'])) {