Commit cd32aedc authored by lyricnz's avatar lyricnz
Browse files

Issue #1118772: Filter invalid geonameids

parent 1bb9131d
......@@ -65,7 +65,9 @@ function geonames_metadata_update() {
$num = preg_match_all('/^[A-Z].*?$/ms', $file->data, $matches);
foreach ($matches[0] as $line) {
$object = array_combine($field_names, split("\t", $line));
drupal_write_record($tablename, $object);
if ($object['geonameid'] != 0) {
drupal_write_record($tablename, $object);
}
}
watchdog("geonames", "Successfully updated the $tablename table");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment