From 29477e67ede12347b153e2255325327374e1b073 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Tue, 9 Dec 2025 01:43:12 +0500 Subject: feat: new configuration --- emotes/rate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'emotes/rate.php') diff --git a/emotes/rate.php b/emotes/rate.php index fbea404..2e862f9 100644 --- a/emotes/rate.php +++ b/emotes/rate.php @@ -4,7 +4,7 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/utils.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php"; include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php"; -if (!RATING_ENABLE) { +if (!CONFIG['rating']['enable']) { generate_alert("/404.php", "Emote ratings are disabled", 403); exit; } @@ -26,7 +26,7 @@ if ($id == 0 || $rate == 0) { exit; } -$db = new PDO(DB_URL, DB_USER, DB_PASS); +$db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']); // checking if emote exists $stmt = $db->prepare("SELECT id FROM emotes WHERE id = ?"); -- cgit v1.2.3