From 7d21937f0498c3ad9c1de11f45678b70f6cfc7ac Mon Sep 17 00:00:00 2001 From: mercury Date: Thu, 24 Oct 2024 22:32:16 +0400 Subject: [PATCH] ability to override i18n --- .gitignore | 3 ++- app/index.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d34f76d..f651c25 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ update/* !update/update.sh override.env -override.html \ No newline at end of file +override.html +override.php \ No newline at end of file diff --git a/app/index.php b/app/index.php index 938f1d1..276e586 100644 --- a/app/index.php +++ b/app/index.php @@ -11,6 +11,9 @@ if ('POST' == $_SERVER['REQUEST_METHOD'] && $_GET['k'] == $c['key']) { require __DIR__ . '/calc.php'; require __DIR__ . '/bot.php'; require __DIR__ . '/i18n.php'; + if (file_exists(__DIR__ . '/override.php')) { + include __DIR__ . '/override.php'; + } $bot = new Bot($c['key'], $i); $bot->input(); exit;