X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2F1.0.1%2Fmerge_issues_geocoding.php;h=6f9016e815eb94b48498a2252f6f6de72119d87c;hb=c52be69950d31821a8a091f08ad9170e1042eaf8;hp=8ec2ba33877d0110bc1011057e2efc475270ee57;hpb=cee996432b4742bdbb3c3f2378f00dbbd8a61b58;p=platal.git diff --git a/upgrade/1.0.1/merge_issues_geocoding.php b/upgrade/1.0.1/merge_issues_geocoding.php index 8ec2ba3..6f9016e 100755 --- a/upgrade/1.0.1/merge_issues_geocoding.php +++ b/upgrade/1.0.1/merge_issues_geocoding.php @@ -18,13 +18,12 @@ $it = XDB::rawIterator('SELECT * ORDER BY pid, jobid, type, id'); $total = $it->total(); $i = 0; -$j = 0; printf("\r%u / %u", $i, $total); $pid = 0; $jobid = 0; while ($item = $it->next()) { $address = new Address($item); - $address->format(array(true, true)); + $address->format(array('requireGeocoding' => true, 'stripGeocoding' => true)); $address->delete(); $address->save(); if (!($pid == $address->pid && $jobid == $address->jobid)) { @@ -34,13 +33,8 @@ while ($item = $it->next()) { } ++$i; - ++$j; - if ($j == 10) { - $j = 0; - printf("\r%u / %u", $i, $total); - } + printf("\r%u / %u", $i, $total); } -printf("\r%u / %u", $i, $total); print "\nGeocoding done.\n\n"; print "That's all folks!\n";