From f2690a42235297c357bcd8abbf6e194db7b7bd57 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 11 May 2025 16:52:46 +0500 Subject: feat: store original uploads --- public/emotes/index.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'public/emotes/index.php') diff --git a/public/emotes/index.php b/public/emotes/index.php index e9e93cb..811ada2 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -195,6 +195,14 @@ if (CLIENT_REQUIRES_JSON) { echo "Emote - " . $emote->get_code(); echo '
'; + $original_path = "/static/userdata/emotes/" . $emote->get_id(); + $files = glob($_SERVER["DOCUMENT_ROOT"] . $original_path . "/original.*"); + + if (!empty($files)) { + $filename = basename($files[0]); + echo "[Show original]"; + } + $stmt = $db->prepare(" SELECT MAX(es.is_featured) AS is_featured, MAX(es.is_global) AS is_global FROM emote_sets es -- cgit v1.2.3