diff --git a/public/telegram/broadcast_test.php b/public/telegram/broadcast_test.php index f598640..4654338 100644 --- a/public/telegram/broadcast_test.php +++ b/public/telegram/broadcast_test.php @@ -14,8 +14,8 @@ require_once __DIR__ . '/../auth_helpers.php'; $config = require __DIR__ . '/../../config/database.php'; $telegramConfig = require __DIR__ . '/../../config/telegram.php'; -require_once __DIR__ . '/../../scripts/telegram/lib/message_footer.php'; -require_once __DIR__ . '/../../scripts/telegram/lib/http.php'; +require_once __DIR__ . '/lib/message_footer.php'; +require_once __DIR__ . '/lib/http.php'; $dsn = sprintf( 'mysql:host=%s;dbname=%s;charset=%s', diff --git a/scripts/telegram/lib/http.php b/public/telegram/lib/http.php similarity index 100% rename from scripts/telegram/lib/http.php rename to public/telegram/lib/http.php diff --git a/scripts/telegram/lib/message_footer.php b/public/telegram/lib/message_footer.php similarity index 100% rename from scripts/telegram/lib/message_footer.php rename to public/telegram/lib/message_footer.php diff --git a/public/telegram/webhook.php b/public/telegram/webhook.php index 5ae6bf2..dfb073a 100644 --- a/public/telegram/webhook.php +++ b/public/telegram/webhook.php @@ -6,8 +6,8 @@ error_reporting(E_ALL); $config = require __DIR__ . '/../../config/database.php'; $telegramConfig = require __DIR__ . '/../../config/telegram.php'; -require_once __DIR__ . '/../../scripts/telegram/lib/message_footer.php'; -require_once __DIR__ . '/../../scripts/telegram/lib/http.php'; +require_once __DIR__ . '/lib/message_footer.php'; +require_once __DIR__ . '/lib/http.php'; $dsn = sprintf( 'mysql:host=%s;dbname=%s;charset=%s', diff --git a/scripts/telegram/bootstrap.php b/scripts/telegram/bootstrap.php index 1393ba3..5c7c838 100644 --- a/scripts/telegram/bootstrap.php +++ b/scripts/telegram/bootstrap.php @@ -17,7 +17,7 @@ $rootDir = dirname(__DIR__, 2); $stateFile = __DIR__ . DIRECTORY_SEPARATOR . 'telegram_cron_state.json'; $dbConfig = require $rootDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'database.php'; $telegramConfig = require $rootDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'telegram.php'; -require_once __DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'message_footer.php'; +require_once $rootDir . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR . 'telegram' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'message_footer.php'; $GLOBALS['filterColorConfigPath'] = $rootDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'filter_colors.json'; diff --git a/scripts/telegram/lib/telegram_api.php b/scripts/telegram/lib/telegram_api.php index 6160254..315a90b 100644 --- a/scripts/telegram/lib/telegram_api.php +++ b/scripts/telegram/lib/telegram_api.php @@ -9,7 +9,7 @@ declare(strict_types=1); * und Dokumenten. Die Cron-Tasks muessen dadurch keine Request-Details kennen. */ -require_once __DIR__ . '/http.php'; +require_once dirname(__DIR__, 2) . '/public/telegram/lib/http.php'; function telegramHttpPostMultipart(string $url, array $fields, string $fileField, string $filePath, ?string $fileName = null): array