From 059e71503714d413abe9f73a6fb334bc7e191cfc Mon Sep 17 00:00:00 2001 From: "Martin Brieska (Fatchilli)" Date: Wed, 18 Dec 2024 11:21:18 +0000 Subject: [PATCH] Fix relative path to maxmind database remp/remp#1402 --- CHANGELOG.md | 1 + Campaign/.env.example | 2 +- Campaign/extensions/campaign-module/public/showtime.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d23f2659b..fe34ad0d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Fixed ARIA-compatibility of all campaign banners. remp/remp#1368 - Fixed an unclickable Overlay Rectangle banner when no main text and button text is present. remp/remp#1393 +- Changed path to maxmind database in .env.example. remp/remp#1402 ### [Mailer] diff --git a/Campaign/.env.example b/Campaign/.env.example index 6a2ef4275..b0de94abe 100644 --- a/Campaign/.env.example +++ b/Campaign/.env.example @@ -178,7 +178,7 @@ SENTRY_SHOWTIME_SAMPLERATE=1 # Path to .mmdb file containing binary maxmind database. You don't need to change this unless you have paid database # and you want to use it instead of free version provided withing the repository. -MAXMIND_DATABASE=resources/assets/maxmind/GeoLite2-Country.mmdb +MAXMIND_DATABASE=extensions/campaign-module/resources/assets/maxmind/GeoLite2-Country.mmdb ##################### # Newsletter Subscription Banner diff --git a/Campaign/extensions/campaign-module/public/showtime.php b/Campaign/extensions/campaign-module/public/showtime.php index f494228c0..a0ce52e86 100644 --- a/Campaign/extensions/campaign-module/public/showtime.php +++ b/Campaign/extensions/campaign-module/public/showtime.php @@ -473,7 +473,7 @@ private function renderInternal( if (file_exists(env('MAXMIND_DATABASE'))) { $maxmindDbPath = env('MAXMIND_DATABASE'); } else { - $maxmindDbPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . env('MAXMIND_DATABASE'); + $maxmindDbPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . env('MAXMIND_DATABASE'); } $geoReader = new LazyGeoReader($maxmindDbPath);