summaryrefslogtreecommitdiff
path: root/emotes/rate.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-09 01:43:12 +0500
committerilotterytea <iltsu@alright.party>2025-12-09 01:43:12 +0500
commit29477e67ede12347b153e2255325327374e1b073 (patch)
treebe9170a20d332eab1fcc8b380f70f231921aac45 /emotes/rate.php
parent28bb4f3618e2e947d14a05a24e99d826c26c0ce3 (diff)
feat: new configuration
Diffstat (limited to 'emotes/rate.php')
-rw-r--r--emotes/rate.php4
1 files changed, 2 insertions, 2 deletions
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 = ?");