From d7c5eefe71a1eb3a7ea7d1c2c16e0bba97cd0976 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sun, 5 Jul 2026 18:23:55 +0300 Subject: [PATCH] Update: 2026-07-05 18:23:55 --- backend/functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/functions.php b/backend/functions.php index 2a7a63e5..2050e736 100644 --- a/backend/functions.php +++ b/backend/functions.php @@ -11,6 +11,16 @@ use Firebase\JWT\BeforeValidException; $INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : ''; +/** + * Helper to get the global Redis connection defined in bootstrap.php + */ +if (!function_exists('getRedisConnection')) { + function getRedisConnection() { + global $redis; + return $redis; + } +} + /** * دالة البحث الهجين (Redis + MySQL) * @param $redis Client : اتصال الريدز