Rename Functions: flash_alert, sanitizeFilename and display_folder_options using camelCase instead to match other custom php functions

This commit is contained in:
johnnyq
2026-07-14 17:41:41 -04:00
parent f1836c70cd
commit b8873039a4
82 changed files with 603 additions and 603 deletions

View File

@@ -7,7 +7,7 @@ require_once "../includes/check_login.php";
$settings_mail_path = '/admin/settings_mail.php';
if (!isset($session_is_admin) || !$session_is_admin) {
flash_alert("Admin access required.", 'error');
flashAlert("Admin access required.", 'error');
redirect($settings_mail_path);
}
@@ -27,17 +27,17 @@ if (!empty($error)) {
$msg .= " ($error_description)";
}
flash_alert($msg, 'error');
flashAlert($msg, 'error');
redirect($settings_mail_path);
}
if (empty($state) || empty($code) || empty($session_state) || !hash_equals($session_state, $state) || time() > $session_state_expires) {
flash_alert("Microsoft OAuth callback validation failed. Please try connecting again.", 'error');
flashAlert("Microsoft OAuth callback validation failed. Please try connecting again.", 'error');
redirect($settings_mail_path);
}
if (empty($config_mail_oauth_client_id) || empty($config_mail_oauth_client_secret) || empty($config_mail_oauth_tenant_id)) {
flash_alert("Microsoft OAuth settings are incomplete. Please fill Client ID, Client Secret, and Tenant ID.", 'error');
flashAlert("Microsoft OAuth settings are incomplete. Please fill Client ID, Client Secret, and Tenant ID.", 'error');
redirect($settings_mail_path);
}
@@ -71,13 +71,13 @@ curl_close($ch);
if ($raw_body === false || $http_code < 200 || $http_code >= 300) {
$reason = !empty($curl_err) ? $curl_err : "HTTP $http_code";
flash_alert("Microsoft OAuth token exchange failed: $reason", 'error');
flashAlert("Microsoft OAuth token exchange failed: $reason", 'error');
redirect($settings_mail_path);
}
$json = json_decode($raw_body, true);
if (!is_array($json) || empty($json['refresh_token']) || empty($json['access_token'])) {
flash_alert("Microsoft OAuth token exchange failed: refresh token or access token missing.", 'error');
flashAlert("Microsoft OAuth token exchange failed: refresh token or access token missing.", 'error');
redirect($settings_mail_path);
}
@@ -99,5 +99,5 @@ mysqli_query($mysqli, "UPDATE settings SET
");
logAudit("Settings", "Edit", "$session_name completed Microsoft OAuth connect flow for mail settings");
flash_alert("Microsoft OAuth connected successfully. Token expires at $expires_at.");
flashAlert("Microsoft OAuth connected successfully. Token expires at $expires_at.");
redirect($settings_mail_path);