function geoip_get_path in GeoIP API 6
Same name and namespace in other branches
- 7 geoip.module \geoip_get_path()
Get the file path of the GeoIP module.
This is a wrapper around drupal_get_path() that falls back to simply using the directory of the module file if too early in the bootstrap.
1 call to geoip_get_path()
- _geoip_load_lib in ./
geoip.module - Include the external GeoIP libraries.
File
- ./
geoip.module, line 143 - API for using the MaxMind GeoLite Country database.
Code
function geoip_get_path() {
if (function_exists('drupal_get_path')) {
// Let Drupal set the path.
$path = drupal_get_path('module', 'geoip');
}
else {
// Fallback to trying to find the path based on PHP's knowledge of our
// current path.
$path = dirname(__FILE__);
}
return $path;
}