Import/Core_geoip.php
authorEdward <edward@roojs.com>
Tue, 13 May 2014 09:53:45 +0000 (17:53 +0800)
committerEdward <edward@roojs.com>
Tue, 13 May 2014 09:53:45 +0000 (17:53 +0800)
Import/Core_geoip.php

index e84589d..109fd97 100644 (file)
@@ -37,8 +37,6 @@ class Pman_Core_Import_Core_geoip extends Pman_Roo
             $this->jerr('GeoLite2-City-Locations.csv OR GeoLite2-City-Blocks.csv does not exists?!');
         }
         
-        ini_set("auto_detect_line_endings", true);
-        
         $this->insertLocation($location);
         
         $this->insertBlock($block);
@@ -46,6 +44,8 @@ class Pman_Core_Import_Core_geoip extends Pman_Roo
     
     function insertLocation($csv)
     {
+        ini_set("auto_detect_line_endings", true);
+        
         $fh = fopen($csv, 'r');
         if (!$fh) {
             $this->jerr("invalid location file");