diff options
-rw-r--r-- | plugins/GeoIp2/Controller.php | 4 | ||||
-rw-r--r-- | plugins/GeoIp2/GeoIP2AutoUpdater.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/GeoIp2/Controller.php b/plugins/GeoIp2/Controller.php index 2de183067e..17b451eb19 100644 --- a/plugins/GeoIp2/Controller.php +++ b/plugins/GeoIp2/Controller.php @@ -36,7 +36,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin if ($_SERVER["REQUEST_METHOD"] == "POST") { $this->checkTokenInUrl(); Json::sendHeaderJSON(); - $outputPath = GeoIp2::getPathForGeoIpDatabase('DBIP-City.mmdb') . '.gz'; + $outputPath = GeoIP2AutoUpdater::getTemporaryFolder('DBIP-City.mmdb') . '.gz'; try { $result = Http::downloadChunk( $url = GeoIp2::getDbIpLiteUrl(), @@ -146,7 +146,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $url = GeoIP2AutoUpdater::getConfiguredUrl($key); $filename = GeoIP2AutoUpdater::getZippedFilenameToDownloadTo($url, $key, GeoIP2AutoUpdater::getGeoIPUrlExtension($url)); - $outputPath = GeoIp2::getPathForGeoIpDatabase($filename); + $outputPath = GeoIP2AutoUpdater::getTemporaryFolder($filename); // download part of the file $result = Http::downloadChunk( diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php index f4be4291b2..32d6af210e 100644 --- a/plugins/GeoIp2/GeoIP2AutoUpdater.php +++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php @@ -190,7 +190,7 @@ class GeoIP2AutoUpdater extends Task Log::info("GeoIP2AutoUpdater: successfully updated GeoIP 2 database '%s'", $url); } - protected static function getTemporaryFolder($file) + public static function getTemporaryFolder($file) { return \Piwik\Container\StaticContainer::get('path.tmp') . '/latest/' . $file; } |