facilite l'upgrade
authorx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 16 Jun 2006 17:46:08 +0000 (17:46 +0000)
committerx2001corpet <x2001corpet@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 16 Jun 2006 17:46:08 +0000 (17:46 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@319 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/admin/geoloc_dynamap.php
upgrade/0.9.10/02_tels.sql

index 53dd692..a7feae5 100644 (file)
@@ -27,6 +27,8 @@ if (Env::get('fix') == 'cities_not_on_map')
     require_once('geoloc.inc.php');
     if (!fix_cities_not_on_map(100))
         $page->trig("Impossible d'accéder au webservice");
+    else
+        $refresh = true;
 }
 
 if (Env::has('new_maps'))
@@ -37,7 +39,11 @@ if (Env::has('new_maps'))
 }
 
 $countMissing = $globals->xdb->query("SELECT COUNT(*) FROM geoloc_city AS c LEFT JOIN geoloc_city_in_maps AS m ON(c.id = m.city_id) WHERE m.city_id IS NULL");
-$page->assign("nb_cities_not_on_map", $countMissing->fetchOneCell());
+$missing = $countMissing->fetchOneCell();
+
+if (isset($refresh) && $missing)
+    header('Refresh: 3');
+$page->assign("nb_cities_not_on_map", $missing);
 
 $page->run();
 
index 6314401..8022145 100644 (file)
@@ -10,3 +10,4 @@ CREATE TABLE `tels` (
 INSERT INTO tels SELECT uid, adrid, 0, 'Tél.', tel_pub, tel FROM adresses;
 INSERT INTO tels SELECT uid, adrid, 1, 'Fax', tel_pub, fax FROM adresses;
 DELETE FROM tels WHERE tel = "";
+ALTER TABLE `adresses` DROP `tel`, DROP `tel_pub`;
\ No newline at end of file