Skip to content

Commit

Permalink
Update maxmind.php (Open-Web-Analytics#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
criterion9 authored Mar 8, 2020
1 parent 766f68a commit 77ca1ee
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions modules/maxmind_geoip/classes/maxmind.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@

require_once( OWA_BASE_DIR.'/owa_location.php' );

require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader.php' );
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Decoder.php' );
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/InvalidDatabaseException.php' );
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Metadata.php' );
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Util.php' );
if(!class_exists('\MaxMind\Db\Reader')){
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader.php' );
}
if (!class_exists('MaxMind\Db\Reader\Decoder')) {
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Decoder.php' );
}
if (!class_exists('MaxMind\Db\Reader\InvalidDatabaseException')) {
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/InvalidDatabaseException.php' );
}
if (!class_exists('MaxMind\Db\Reader\Metadata')) {
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Metadata.php' );
}
if (!class_exists('MaxMind\Db\Reader\Util')) {
require_once( OWA_MODULES_DIR . 'maxmind_geoip/includes/MaxMind-DB-Reader-php-1.0.3/src/MaxMind/Db/Reader/Util.php' );
}

use MaxMind\Db\Reader;

Expand Down Expand Up @@ -198,4 +208,4 @@ private function mapCityRecord( $record, $location_map = array(), $lang = 'en' )

}

?>
?>

0 comments on commit 77ca1ee

Please sign in to comment.