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

@@ -169,7 +169,7 @@ function getFieldById($table, $id, $field, $escape_method = 'sql') {
}
// Recursive function to display folder options - Used in folders files and documents
function display_folder_options($parent_folder_id, $client_id, $indent = 0) {
function displayFolderOptions($parent_folder_id, $client_id, $indent = 0) {
global $mysqli;
$sql_folders = mysqli_query($mysqli, "SELECT * FROM folders WHERE parent_folder = $parent_folder_id AND folder_client_id = $client_id ORDER BY folder_name ASC");
@@ -190,7 +190,7 @@ function display_folder_options($parent_folder_id, $client_id, $indent = 0) {
echo "<option value=\"$folder_id\" $selected>$indentation$folder_name</option>";
// Recursively display subfolders
display_folder_options($folder_id, $client_id, $indent + 1);
displayFolderOptions($folder_id, $client_id, $indent + 1);
}
}

View File

@@ -78,7 +78,7 @@ function enforceClientAccess($client_id = null) {
$session_user_id = (int) $session_user_id;
if (empty($client_id) || empty($session_user_id)) {
flash_alert('Access Denied.', 'error');
flashAlert('Access Denied.', 'error');
redirect('clients.php');
}
@@ -116,6 +116,6 @@ function enforceClientAccess($client_id = null) {
$client_id
);
flash_alert('Access Denied - You do not have permission to access that client!', 'error');
flashAlert('Access Denied - You do not have permission to access that client!', 'error');
redirect('clients.php');
}

View File

@@ -94,7 +94,7 @@ function redirect($url = null, $permanent = false) {
}
//Flash Alert Function
function flash_alert(string $message, string $type = 'success'): void {
function flashAlert(string $message, string $type = 'success'): void {
$_SESSION['alert_type'] = $type;
$_SESSION['alert_message'] = $message;
}

View File

@@ -77,7 +77,7 @@ function sanitize_url($url) {
}
// Sanitize File Names
function sanitize_filename($filename, $strict = false) {
function sanitizeFilename($filename, $strict = false) {
// Remove path information and dots around the filename
$filename = basename($filename);