From e5dab8b1ca22bc4d157ed133d601f850c557449a Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 10 Jan 2026 19:12:22 -0500 Subject: [PATCH] Update files to use mysqli_fetch_assoc for better performance and memory optimization. Add title for List View and Grid View --- agent/files.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agent/files.php b/agent/files.php index 6205ca17..bbdf54cd 100644 --- a/agent/files.php +++ b/agent/files.php @@ -76,7 +76,7 @@ function display_folders($parent_folder_id, $client_id, $indent = 0) { global $mysqli, $get_folder_id, $session_user_role, $archive_query, $archived; $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"); - while ($row = mysqli_fetch_array($sql_folders)) { + while ($row = mysqli_fetch_assoc($sql_folders)) { $folder_id = intval($row['folder_id']); $folder_name = nullable_htmlentities($row['folder_name']); @@ -442,8 +442,8 @@ $num_root_items = intval($row_root_files['num']) + intval($row_root_docs['num'])