From 3e50715ff37af8076dcad98cf321d3b66f0a034c Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 18 Jun 2025 15:46:57 +0500 Subject: fix: don't add a view from the owner --- public/upload.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/upload.php') diff --git a/public/upload.php b/public/upload.php index fac7c5c..08de5a1 100644 --- a/public/upload.php +++ b/public/upload.php @@ -317,6 +317,11 @@ try { $db->prepare('INSERT INTO file_metadata(width, height, duration, line_count, id) VALUES (?, ?, ?, ?, ?)') ->execute(array_values($file_data['metadata'])); } + + // don't add a view from the owner + $viewed_file_ids = $_SESSION['viewed_file_ids'] ?? []; + array_push($viewed_file_ids, $file_id); + $_SESSION['viewed_file_ids'] = $viewed_file_ids; } catch (RuntimeException $e) { generate_alert( "/", -- cgit v1.2.3