Merge branch 'platal-0.9.17'
[platal.git] / modules / geoloc.php
index 86bfbc9..0a83602 100644 (file)
@@ -42,7 +42,7 @@ class GeolocModule extends PLModule
     function handler_admin(&$page, $action = false) {
         $page->changeTpl('geoloc/admin.tpl');
         require_once("geoloc.inc.php");
-        $page->assign('xorg_title','Polytechnique.org - Administration - Geolocalisation');
+        $page->setTitle('Administration - Geolocalisation');
 
         $nb_synchro = 0;
 
@@ -56,7 +56,7 @@ class GeolocModule extends PLModule
         }
 
         if ($nb_synchro)
-            $page->trig(($nb_synchro > 1)?($nb_synchro." villes ont été synchronisées"):"Une ville a été synchronisée");
+            $page->trigSuccess(($nb_synchro > 1)?($nb_synchro." villes ont été synchronisées"):"Une ville a été synchronisée");
 
         $res = XDB::query("SELECT COUNT(*) FROM geoloc_city WHERE lat = 0 AND lon = 0");
         $page->assign("nb_missinglat", $res->fetchOneCell());
@@ -68,7 +68,7 @@ class GeolocModule extends PLModule
         if ($action == 'cities_not_on_map') {
             require_once('geoloc.inc.php');
             if (!fix_cities_not_on_map(20))
-                $page->trig("Impossible d'accéder au webservice");
+                $page->trigError("Impossible d'accéder au webservice");
             else
                 $refresh = true;
         }
@@ -87,7 +87,7 @@ class GeolocModule extends PLModule
         if ($action == 'newmaps') {
             require_once('geoloc.inc.php');
             if (!get_new_maps(Env::v('url')))
-                $page->trig("Impossible d'accéder aux nouvelles cartes");
+                $page->trigError("Impossible d'accéder aux nouvelles cartes");
         }
 
         $countMissing = 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");
@@ -100,7 +100,7 @@ class GeolocModule extends PLModule
         $noCoordinates = $countNoCoordinates->fetchOneCell();
 
         if (isset($refresh) && $missing) {
-            $page->assign("xorg_extra_header", "<meta http-equiv='Refresh' content='3'/>");
+            $page->assign("pl_extra_header", "<meta http-equiv='Refresh' content='3'/>");
         }
         $page->assign("nb_cities_not_on_map", $missing);
         $page->assign("no_smallest", $noSmallest);