projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b59c6d8
)
Import/Core_geoip.php
author
Edward
<edward@roojs.com>
Tue, 13 May 2014 10:50:18 +0000
(18:50 +0800)
committer
Edward
<edward@roojs.com>
Tue, 13 May 2014 10:50:18 +0000
(18:50 +0800)
Import/Core_geoip.php
patch
|
blob
|
history
diff --git
a/Import/Core_geoip.php
b/Import/Core_geoip.php
index
97cf8f7
..
a884e82
100644
(file)
--- a/
Import/Core_geoip.php
+++ b/
Import/Core_geoip.php
@@
-37,7
+37,7
@@
class Pman_Core_Import_Core_geoip extends Pman_Roo
$this->jerr('GeoLite2-City-Locations.csv OR GeoLite2-City-Blocks.csv does not exists?!');
}
$this->jerr('GeoLite2-City-Locations.csv OR GeoLite2-City-Blocks.csv does not exists?!');
}
-
//
$this->insertLocation($location);
+ $this->insertLocation($location);
$this->insertBlock($block);
}
$this->insertBlock($block);
}
@@
-252,7
+252,7
@@
class Pman_Core_Import_Core_geoip extends Pman_Roo
$network_mapping = DB_DataObject::factory('core_geoip_network_mapping');
$start_ip = array_pop(explode(":", $row['NETWORK_START_IP']));
$network_mapping = DB_DataObject::factory('core_geoip_network_mapping');
$start_ip = array_pop(explode(":", $row['NETWORK_START_IP']));
- print_r($start_ip);exit;
+
$network_mapping->setFrom(array(
'start_ip' => $start_ip,
'mask_length' => pow(2, (128 - $row['NETWORK_MASK_LENGTH'])),
$network_mapping->setFrom(array(
'start_ip' => $start_ip,
'mask_length' => pow(2, (128 - $row['NETWORK_MASK_LENGTH'])),