Removes deprecated script upgrade/1.0.1/merge_issues_geocoding.php, use bin/formatAdd...
authorStéphane Jacob <sj@m4x.org>
Sat, 10 Dec 2011 20:52:06 +0000 (21:52 +0100)
committerStéphane Jacob <sj@m4x.org>
Sat, 10 Dec 2011 20:52:06 +0000 (21:52 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
upgrade/1.0.1/merge_issues_geocoding.php [deleted file]

diff --git a/upgrade/1.0.1/merge_issues_geocoding.php b/upgrade/1.0.1/merge_issues_geocoding.php
deleted file mode 100755 (executable)
index df98463..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/php5
-<?php
-// WARNING: this script takes a few weeks to be executed completly, thus run it into a screen.
-
-require_once 'connect.db.inc.php';
-require_once '../../classes/address.php';
-
-$globals->debug = 0; // Do not store backtraces.
-
-print "Tries to geocode addresses (due a bug in the previous release, all addresses must run once again).\n";
-$time = XDB::fetchOneCell('SELECT  COUNT(distinct(pid), jobid)
-                             FROM  profile_addresses
-                            WHERE  accuracy IS NOT NULL AND accuracy > 0');
-$time = ceil($time / 60 / 24);
-print "It will approximately take $time days.\n";
-
-$it = XDB::rawIterator('SELECT  *
-                          FROM  profile_addresses
-                         WHERE  accuracy IS NOT NULL AND accuracy > 0
-                      ORDER BY  pid, jobid, type, id');
-$total = $it->total();
-$i = 0;
-printf("\r%u / %u",  $i, $total);
-$pid = 0;
-$jobid = 0;
-while ($item = $it->next()) {
-    $address = new Address($item);
-    $address->format(array('requireGeocoding' => true, 'stripGeocoding' => true));
-    $address->delete();
-    $address->save();
-    if (!($pid == $address->pid && $jobid == $address->jobid)) {
-        $pid = $address->pid;
-        $jobid = $address->jobid;
-        sleep(60);
-    }
-
-    ++$i;
-    printf("\r%u / %u",  $i, $total);
-}
-print "\nGeocoding done.\n\n";
-print "That's all folks!\n";
-
-/* vim:set et sw=4 sts=4 ts=4: */
-?>