diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-18 15:46:57 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-18 15:46:57 +0500 |
| commit | 3e50715ff37af8076dcad98cf321d3b66f0a034c (patch) | |
| tree | 48bccffb2bfbf0b07aac839438cb74ab711a0044 /public | |
| parent | 5ccc4a0fce0548697e5e57253f977d2d14a6cbea (diff) | |
fix: don't add a view from the owner
Diffstat (limited to 'public')
| -rw-r--r-- | public/upload.php | 5 |
1 files changed, 5 insertions, 0 deletions
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( "/", |
