2014-01-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: added function "https_is_running". * include/functions_gis.php, operation/gis_maps/render_view.php, operation/gis_maps/public_console.php, godmode/setup/gis_step_2.php: fixed the urls for google maps when it is running in https mode. Fixes: #2403 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9303 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
613df874b7
commit
be56740004
pandora_console
|
@ -1,3 +1,13 @@
|
||||||
|
2014-01-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions.php: added function "https_is_running".
|
||||||
|
|
||||||
|
* include/functions_gis.php, operation/gis_maps/render_view.php,
|
||||||
|
operation/gis_maps/public_console.php, godmode/setup/gis_step_2.php:
|
||||||
|
fixed the urls for google maps when it is running in https mode.
|
||||||
|
|
||||||
|
Fixes: #2403
|
||||||
|
|
||||||
2014-01-09 Junichi Satoh <junichi@rworks.jp>
|
2014-01-09 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* godmode/servers/plugin.php: Fixed that unexpected strings are set
|
* godmode/servers/plugin.php: Fixed that unexpected strings are set
|
||||||
|
|
|
@ -68,6 +68,17 @@ require_once('functions_io.php');
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
function https_is_running() {
|
||||||
|
if (isset ($_SERVER['HTTPS'])
|
||||||
|
&& ($_SERVER['HTTPS'] === true
|
||||||
|
|| $_SERVER['HTTPS'] == 'on')) {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleans an object or an array and casts all values as integers
|
* Cleans an object or an array and casts all values as integers
|
||||||
*
|
*
|
||||||
|
|
|
@ -1001,9 +1001,16 @@ function gis_get_agent_map($agent_id, $heigth, $width, $show_history = false, $c
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($gmap_layer === true) {
|
if ($gmap_layer === true) {
|
||||||
?>
|
if (https_is_running()) {
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="https://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
?>
|
||||||
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gis_print_map($agent_name . "_agent_map", $defaultMap['zoom_level'],
|
gis_print_map($agent_name . "_agent_map", $defaultMap['zoom_level'],
|
||||||
|
|
|
@ -94,9 +94,16 @@ if ($confMap !== false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($gmap_layer === true) {
|
if ($gmap_layer === true) {
|
||||||
|
if (https_is_running()) {
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="https://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition', 'layerSwitcher');
|
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition', 'layerSwitcher');
|
||||||
|
|
|
@ -72,10 +72,18 @@ if ($confMap !== false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($gmap_layer === true) {
|
if ($gmap_layer === true) {
|
||||||
|
if (https_is_running()) {
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="https://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition', 'layerSwitcher');
|
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition', 'layerSwitcher');
|
||||||
|
|
Loading…
Reference in New Issue