From 55b8708c6afae80c17a5a77bd973e5a02ac722c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Becker?= Date: Mon, 27 Nov 2017 20:46:46 +0100 Subject: [PATCH] Replace get_absolute_root_url through get_root_url If you're behind you reverse proxy like varnish for instance and you webserver is running on a non-reachable port the global map doesn't work at all. get_absolute_root_url will return something like "http://domain:8080/...". With get_root_url this will be fixed. --- map.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/map.php b/map.php index b9d857b..8fa4ab9 100644 --- a/map.php +++ b/map.php @@ -59,7 +59,7 @@ } -$map_data_url = get_absolute_root_url().'plugins/'.$rvm_dir.'/map_data.php?'; +$map_data_url = get_root_url().'plugins/'.$rvm_dir.'/map_data.php?'; $map_data_url .= $section; $template->set_filename( 'map', dirname(__FILE__).'/template/map.tpl' ); @@ -69,7 +69,7 @@ 'GMAPS_API_KEY' => !empty($conf['gmaps_api_key']) ? $conf['gmaps_api_key'] : '', 'CONTENT_ENCODING' => get_pwg_charset(), 'RVM_PLUGIN_VERSION' => RVM_PLUGIN_VERSION, - 'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir, + 'PLUGIN_ROOT_URL' => get_root_url().'plugins/'.$rvm_dir, 'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir, 'U_MAP_DATA' => $map_data_url, 'GALLERY_TITLE' => $conf['gallery_title'], @@ -92,4 +92,4 @@ $template->pparse('map'); $template->p(); -?> \ No newline at end of file +?>