From: x2001corpet Date: Sun, 30 Jul 2006 16:58:01 +0000 (+0000) Subject: nettoyage geoloc X-Git-Tag: xorg/0.9.11~185 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e336465e05bbca91fd0eb3f5b4c27f1391529f98;p=platal.git nettoyage geoloc git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@729 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 3d3e494..5258903 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -81,8 +81,7 @@ class XnetPage extends PlatalPage $sub['présentation'] = "$dim/"; if (may_update() || $globals->asso('pub') == 'public') { $sub['annuaire du groupe'] = "$dim/annuaire"; - if ($globals->xnet->geoloc) - $sub['carte'] = "$dim/geoloc"; + $sub['carte'] = "$dim/geoloc"; } if ($globals->asso('mail_domain')) { $sub['listes de diffusion'] = "$dim/lists"; diff --git a/modules/geoloc.php b/modules/geoloc.php index cfcd673..1e2920e 100644 --- a/modules/geoloc.php +++ b/modules/geoloc.php @@ -54,12 +54,17 @@ class GeolocModule extends PLModule return $querystring; } + function use_map() + { + return is_file(dirname(__FILE__).'/geoloc/dynamap.swf') && + is_file(dirname(__FILE__).'/geoloc/icon.swf'); + } + function handler_default(&$page) { global $globals; - if (!is_file(dirname(__FILE__).'/geoloc/dynamap.swf') || - !is_file(dirname(__FILE__).'/geoloc/icon.swf')) + if (!$this->use_map()) $page->assign('request_geodesix', 1); if (!empty($GLOBALS['IS_XNET_SITE'])) { @@ -121,7 +126,7 @@ class GeolocModule extends PLModule { global $globals; - $page->changeTpl('geoloc/geolocInit.tpl', NO_SKIN); + $page->changeTpl('geoloc/init.tpl', NO_SKIN); header('Content-type: text/xml'); header('Pragma:'); @@ -137,7 +142,7 @@ class GeolocModule extends PLModule header("Content-type: text/xml"); header("Pragma:"); - $page->changeTpl('geoloc/getCityInfos.tpl', NO_SKIN); + $page->changeTpl('geoloc/city.tpl', NO_SKIN); require_once('geoloc.inc.php'); require_once('search.inc.php'); @@ -173,11 +178,11 @@ class GeolocModule extends PLModule // to debug sql use the next line if (Env::has('debug')) { - $page->changeTpl('geoloc/getData.tpl', SIMPLE); + $page->changeTpl('geoloc/country.tpl', SIMPLE); } else { header("Content-type: text/xml"); header("Pragma:"); - $page->changeTpl('geoloc/getData.tpl', NO_SKIN); + $page->changeTpl('geoloc/country.tpl', NO_SKIN); } require_once 'geoloc.inc.php'; diff --git a/templates/geoloc/getCityInfos.tpl b/templates/geoloc/city.tpl similarity index 100% rename from templates/geoloc/getCityInfos.tpl rename to templates/geoloc/city.tpl diff --git a/templates/geoloc/getData.tpl b/templates/geoloc/country.tpl similarity index 100% rename from templates/geoloc/getData.tpl rename to templates/geoloc/country.tpl diff --git a/templates/geoloc/index.tpl b/templates/geoloc/index.tpl index 4a6e88d..5705bb7 100644 --- a/templates/geoloc/index.tpl +++ b/templates/geoloc/index.tpl @@ -64,21 +64,33 @@ function searchMapId(f) {/if} {if !$request_geodesix}

- + + + + + + + +

Carte fournie gracieusement par Geodesix.

{if !$no_annu} diff --git a/templates/geoloc/geolocInit.tpl b/templates/geoloc/init.tpl similarity index 100% rename from templates/geoloc/geolocInit.tpl rename to templates/geoloc/init.tpl diff --git a/templates/search/index.tpl b/templates/search/index.tpl index 9f19adc..1404886 100644 --- a/templates/search/index.tpl +++ b/templates/search/index.tpl @@ -34,7 +34,7 @@ {if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}. - {if $search_results_nb and $advanced and !$simple and $globals->geoloc->use_map} + {if $search_results_nb and $advanced and !$simple}

[Voir la recherche sur une carte].

diff --git a/templates/skin/common.menu.tpl b/templates/skin/common.menu.tpl index c6b3861..f14f67b 100644 --- a/templates/skin/common.menu.tpl +++ b/templates/skin/common.menu.tpl @@ -61,9 +61,7 @@ -{if $globals->geoloc->use_map} -{/if}