diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-09 18:15:54 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-09 18:15:54 +0500 |
| commit | be2912e26bdf1843c3a91fc0717b301f168d4962 (patch) | |
| tree | 5d8cd5c81f01449ff10022d1e313f68838abcf0c /public/emotes/upload.php | |
| parent | 84458ca14672d25514970a7ab596cb2e4ff269d6 (diff) | |
feat: option to log user actions
Diffstat (limited to 'public/emotes/upload.php')
| -rw-r--r-- | public/emotes/upload.php | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/public/emotes/upload.php b/public/emotes/upload.php index 42e58c6..96544fd 100644 --- a/public/emotes/upload.php +++ b/public/emotes/upload.php @@ -389,19 +389,21 @@ if ($is_manual) { } } -$db->prepare("INSERT INTO actions(user_id, action_type, action_payload) VALUES (?, ?, ?)") - ->execute([ - $uploaded_by, - "EMOTE_CREATE", - json_encode([ - "emote" => [ - "id" => $id, - "code" => $code, - "visibility" => $visibility, - "uploaded_by" => $uploaded_by, - ] - ]) - ]); +if (ACCOUNT_LOG_ACTIONS) { + $db->prepare("INSERT INTO actions(user_id, action_type, action_payload) VALUES (?, ?, ?)") + ->execute([ + $uploaded_by, + "EMOTE_CREATE", + json_encode([ + "emote" => [ + "id" => $id, + "code" => $code, + "visibility" => $visibility, + "uploaded_by" => $uploaded_by, + ] + ]) + ]); +} $db = null; |
