X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=hooks%2Fgeoloc.inc.php;h=89dd7e1f0fb6e4821ced77e83a0d6b7f18537173;hb=bc4ad6aafdd8c14006a1256370d98dede1083aa3;hp=bbdd1c4cb7bd6f8c3c54ed2d1c2c8966a029a617;hpb=5c7c72a4b4aaadf6024e9342ba1c5c3433745a89;p=platal.git diff --git a/hooks/geoloc.inc.php b/hooks/geoloc.inc.php index bbdd1c4..89dd7e1 100644 --- a/hooks/geoloc.inc.php +++ b/hooks/geoloc.inc.php @@ -30,7 +30,10 @@ class GeolocConfig var $icon_path = false; function use_map() { - return $this->dynamap_path != false; + static $use_map; + if (!isset($use_map)) + $use_map = $this->dynamap_path != false && is_file($this->dynamap_path) && is_file($this->icon_path); + return $use_map; } }