From fccc2894d5775d045f557a289a6a4713346a8cad Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 16 May 2025 01:18:24 +0500 Subject: fix: remove report buttons on disabled REPORTS_ENABLE --- public/emotes/index.php | 4 ++-- public/system/index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/emotes/index.php b/public/emotes/index.php index 73aa996..9501f04 100644 --- a/public/emotes/index.php +++ b/public/emotes/index.php @@ -315,8 +315,8 @@ if (CLIENT_REQUIRES_JSON) { } } } - if ($_SESSION["user_role"]["permission_report"]) { - echo 'Report emote'; + if (REPORTS_ENABLE && $_SESSION["user_role"]["permission_report"]) { + echo "Report emote"; } } ?> diff --git a/public/system/index.php b/public/system/index.php index 8786b0e..95b17a5 100644 --- a/public/system/index.php +++ b/public/system/index.php @@ -47,7 +47,7 @@ $db = new PDO(DB_URL, DB_USER, DB_PASS); echo ''; } - if ($_SESSION["user_role"]["permission_report_review"]) { + if (REPORTS_ENABLE && $_SESSION["user_role"]["permission_report_review"]) { echo 'Reports'; $results = $db->query("SELECT COUNT(*) FROM reports WHERE resolved_by IS NULL")->fetch()[0]; -- cgit v1.2.3