diff --git a/client_files.php b/client_files.php index 3d15566ee..5cbe6d15e 100644 --- a/client_files.php +++ b/client_files.php @@ -473,6 +473,7 @@ function display_folders($parent_folder_id, $client_id, $indent = 0) { $file_size_KB = number_format($file_size / 1024); $file_mime_type = nullable_htmlentities($row['file_mime_type']); $file_size = intval($row['file_size']); + $file_uploaded_by = nullable_htmlentities($row['user_name']); $file_has_thumbnail = intval($row['file_has_thumbnail']); $file_has_preview = intval($row['file_has_preview']); $file_created_at = nullable_htmlentities($row['file_created_at']); @@ -490,19 +491,22 @@ function display_folders($parent_folder_id, $client_id, $indent = 0) { AND item_related_id = $file_id LIMIT 1" ); - $row = mysqli_fetch_array($sql_shared); - $item_id = intval($row['item_id']); - $item_active = nullable_htmlentities($row['item_active']); - $item_key = nullable_htmlentities($row['item_key']); - $item_type = nullable_htmlentities($row['item_type']); - $item_related_id = intval($row['item_related_id']); - $item_note = nullable_htmlentities($row['item_note']); - $item_recipient = nullable_htmlentities($row['item_recipient']); - $item_views = nullable_htmlentities($row['item_views']); - $item_view_limit = nullable_htmlentities($row['item_view_limit']); - $item_created_at = nullable_htmlentities($row['item_created_at']); - $item_expire_at = nullable_htmlentities($row['item_expire_at']); - $item_expire_at_human = timeAgo($row['item_expire_at']); + $file_shared = (mysqli_num_rows($sql_shared) > 0) ? true : false; + if ($file_shared) { + $row = mysqli_fetch_array($sql_shared); + $item_id = intval($row['item_id']); + $item_active = nullable_htmlentities($row['item_active']); + $item_key = nullable_htmlentities($row['item_key']); + $item_type = nullable_htmlentities($row['item_type']); + $item_related_id = intval($row['item_related_id']); + $item_note = nullable_htmlentities($row['item_note']); + $item_recipient = nullable_htmlentities($row['item_recipient']); + $item_views = nullable_htmlentities($row['item_views']); + $item_view_limit = nullable_htmlentities($row['item_view_limit']); + $item_created_at = nullable_htmlentities($row['item_created_at']); + $item_expire_at = nullable_htmlentities($row['item_expire_at']); + $item_expire_at_human = timeAgo($row['item_expire_at']); + } ?> @@ -533,7 +537,7 @@ function display_folders($parent_folder_id, $client_id, $indent = 0) {
- 0) { ?> +
Shared