Browse Source

change gmap calls from http to https to avoid browser's mixed content issues TG-2

SiM 5 years ago
parent
commit
a61877482a

+ 2 - 2
apps/admin/modules/kataoMember/templates/updateGmapCoordinatesSuccess.php

@@ -11,7 +11,7 @@
 
 <input type="submit" value="Sauver" /> ou <a href="<?php echo url_for('kataoMember/index') ?>">annuler</a><br /><br />
 
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
+<script type="text/javascript" src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
 
 <script type="text/javascript" language="JavaScript">
 /* <![CDATA[ */
@@ -24,7 +24,7 @@ window.onload = function(){
 
         // "tiny" marker icon
 		var icon = new GIcon();
-		icon.image = "http://maps.google.com/mapfiles/ms/micons/red-dot.png";
+		icon.image = "https://maps.google.com/mapfiles/ms/micons/red-dot.png";
 		icon.iconSize = new GSize(32, 32);
 		icon.iconAnchor = new GPoint(16, 32);
 

+ 2 - 2
apps/admin/modules/kataoSupplier/templates/updateGmapCoordinatesSuccess.php

@@ -11,7 +11,7 @@
 
 <input type="submit" value="Sauver" /> ou <a href="<?php echo url_for('kataoSupplier/index') ?>">annuler</a><br /><br />
 
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
+<script type="text/javascript" src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
 
 <script type="text/javascript" language="JavaScript">
 /* <![CDATA[ */
@@ -24,7 +24,7 @@ window.onload = function(){
 
         // "tiny" marker icon
 		var icon = new GIcon();
-		icon.image = "http://maps.google.com/mapfiles/ms/micons/green-dot.png";
+		icon.image = "https://maps.google.com/mapfiles/ms/micons/green-dot.png";
 		icon.iconSize = new GSize(32, 32);
 		icon.iconAnchor = new GPoint(16, 32);
 

+ 2 - 2
apps/admin/modules/user/templates/profileGmapSuccess.php

@@ -11,7 +11,7 @@
 
 <?php echo submit_tag('Sauver') ?> ou <a href="<?php echo url_for('@profile') ?>">annuler</a><br /><br />
 
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
+<script type="text/javascript" src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
 
 <script type="text/javascript" language="JavaScript">
 /* <![CDATA[ */
@@ -24,7 +24,7 @@ window.onload = function(){
 
         // "tiny" marker icon
 		var icon = new GIcon();
-		icon.image = "http://maps.google.com/mapfiles/ms/micons/red-dot.png";
+		icon.image = "https://maps.google.com/mapfiles/ms/micons/red-dot.png";
 		icon.iconSize = new GSize(32, 32);
 		icon.iconAnchor = new GPoint(16, 32);
 

+ 7 - 7
apps/frontend/modules/Network/templates/_view.php

@@ -1,4 +1,4 @@
-<?php use_javascript('http://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
+<?php use_javascript('https://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
 <div class="content-add01">
 	<br /><div class="heading01"><h1><?php echo $node->getTitle($culture); ?></h1></div>
 
@@ -17,9 +17,9 @@ $nodes = KataoNodePeer::doSelect($criteria);
 		<div class="filter-left">&nbsp;</div>
 		<div class="filter-middle">
 			<u>Légende</u> :
-			&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/red-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Adhérents
-			&nbsp;-&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/blue-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Délégués
-			&nbsp;-&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/green-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Partenaires
+			&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/red-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Adhérents
+			&nbsp;-&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/blue-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Délégués
+			&nbsp;-&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/green-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Partenaires
 		</div>
 		<div class="filter-right">&nbsp;</div>
 	</div>
@@ -39,17 +39,17 @@ window.onload = function(){
 
 		var myIconRed = new GIcon(G_DEFAULT_ICON);
 		myIconRed.iconSize = new GSize(32, 32);
-		myIconRed.image = 'http://maps.google.com/mapfiles/ms/micons/red-dot.png';
+		myIconRed.image = 'https://maps.google.com/mapfiles/ms/micons/red-dot.png';
 		var markerOptionsRed = { icon: myIconRed};
 
 		var myIconGreen = new GIcon(G_DEFAULT_ICON);
 		myIconGreen.iconSize = new GSize(32, 32);
-		myIconGreen.image = 'http://maps.google.com/mapfiles/ms/micons/green-dot.png';
+		myIconGreen.image = 'https://maps.google.com/mapfiles/ms/micons/green-dot.png';
 		var markerOptionsGreen = { icon: myIconGreen};
 
 		var myIconBlue = new GIcon(G_DEFAULT_ICON);
 		myIconBlue.iconSize = new GSize(32, 32);
-		myIconBlue.image = 'http://maps.google.com/mapfiles/ms/micons/blue-dot.png';
+		myIconBlue.image = 'https://maps.google.com/mapfiles/ms/micons/blue-dot.png';
 		var markerOptionsBlue = { icon: myIconBlue};
 
 <?php

+ 7 - 7
apps/frontend/modules/Network/templates/_viewPopup.php

@@ -1,4 +1,4 @@
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
+<script type="text/javascript" src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
 <?php
 
 $criteria = new Criteria();
@@ -58,17 +58,17 @@ window.onload = function(){
 
 		var myIconRed = new GIcon(G_DEFAULT_ICON);
 		myIconRed.iconSize = new GSize(32, 32);
-		myIconRed.image = 'http://maps.google.com/mapfiles/ms/micons/red-dot.png';
+		myIconRed.image = 'https://maps.google.com/mapfiles/ms/micons/red-dot.png';
 		var markerOptionsRed = { icon: myIconRed};
 
 		var myIconGreen = new GIcon(G_DEFAULT_ICON);
 		myIconGreen.iconSize = new GSize(32, 32);
-		myIconGreen.image = 'http://maps.google.com/mapfiles/ms/micons/green-dot.png';
+		myIconGreen.image = 'https://maps.google.com/mapfiles/ms/micons/green-dot.png';
 		var markerOptionsGreen = { icon: myIconGreen};
 
 		var myIconBlue = new GIcon(G_DEFAULT_ICON);
 		myIconBlue.iconSize = new GSize(32, 32);
-		myIconBlue.image = 'http://maps.google.com/mapfiles/ms/micons/blue-dot.png';
+		myIconBlue.image = 'https://maps.google.com/mapfiles/ms/micons/blue-dot.png';
 		var markerOptionsBlue = { icon: myIconBlue};
 
 <?php
@@ -127,9 +127,9 @@ window.onunload = GUnload;
 	<div class="filter-left">&nbsp;</div>
 	<div class="filter-middle">
 		<u>Légende</u> :
-		&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/red-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Adhérents
-		&nbsp;-&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/blue-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Délégués
-		&nbsp;-&nbsp;<?php echo image_tag('http://maps.google.com/mapfiles/ms/micons/green-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Partenaires
+		&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/red-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Adhérents
+		&nbsp;-&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/blue-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Délégués
+		&nbsp;-&nbsp;<?php echo image_tag('https://maps.google.com/mapfiles/ms/micons/green-dot.png', array('alt' => '', 'align' => 'top', 'width' => 20, 'height' => 20)) ?> Partenaires
 	</div>
 	<div class="filter-right">&nbsp;</div>
 </div>

+ 2 - 2
apps/frontend/modules/katao/templates/profileGMapSuccess.php

@@ -44,7 +44,7 @@ unset($allLanguages[$default]);
 
 <?php echo submit_tag('Sauver') ?> ou <a href="<?php echo $sf_request->getReferer() ?>">annuler</a><br /><br />
 
-<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
+<script type="text/javascript" src="https://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>
 
 <script type="text/javascript" language="JavaScript">
 /* <![CDATA[ */
@@ -57,7 +57,7 @@ window.onload = function(){
 
         // "tiny" marker icon
 		var icon = new GIcon();
-		icon.image = "http://maps.google.com/mapfiles/ms/micons/red-dot.png";
+		icon.image = "https://maps.google.com/mapfiles/ms/micons/red-dot.png";
 		icon.iconSize = new GSize(32, 32);
 		icon.iconAnchor = new GPoint(16, 32);
 

+ 2 - 2
apps/frontend/modules/katao/templates/suppliersPopupSuccess.php

@@ -1,4 +1,4 @@
-<?php use_javascript('http://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
+<?php use_javascript('https://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
 
 	<div id="map_canvas" style="width: 730px; height: 580px"></div>
 
@@ -12,7 +12,7 @@ window.onload = function(){
         map.setUIToDefault();
 
 		var myIcon = new GIcon(G_DEFAULT_ICON);
-		myIcon.image = 'http://maps.google.com/mapfiles/marker_green.png';
+		myIcon.image = 'https://maps.google.com/mapfiles/marker_green.png';
 		var markerOptions = { icon: myIcon};
 
 <?php foreach (KataoSupplierPeer::retrieveByPKs(array_keys(KataoSupplierPeer::getAllVisible())) as $katao_supplier): ?>

+ 2 - 2
apps/frontend/modules/katao/templates/suppliersSuccess.php

@@ -34,7 +34,7 @@ unset($allLanguages[$default]);
 
 <div class="content-add03">
 
-<?php use_javascript('http://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
+<?php use_javascript('https://maps.google.com/maps?file=api&amp;v=2&amp;key=' . sfConfig::get('app_gmap') . '&sensor=true'); ?>
 
 	<div id="map_canvas" style="width: 385px; height: 300px"></div>
 
@@ -50,7 +50,7 @@ window.onload = function(){
         map.setUIToDefault();
 
 		var myIcon = new GIcon(G_DEFAULT_ICON);
-		myIcon.image = 'http://maps.google.com/mapfiles/marker_green.png';
+		myIcon.image = 'https://maps.google.com/mapfiles/marker_green.png';
 		var markerOptions = { icon: myIcon};
 
 <?php foreach (KataoSupplierPeer::retrieveByPKs(array_keys(KataoSupplierPeer::getAllVisible())) as $katao_supplier): ?>

+ 2 - 2
lib/utils/utils.class.php

@@ -192,7 +192,7 @@ class Utils {
     }
 
     public static function getLatLng($address) {
-        $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('http://maps.googleapis.com/maps/api/geocode/xml?address=%s&sensor=false', urlencode($address)))));
+        $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('https://maps.googleapis.com/maps/api/geocode/xml?address=%s&sensor=false', urlencode($address)))));
 
         if ($xml->status ==  'OK') {
             // Adresse correcte
@@ -209,7 +209,7 @@ class Utils {
 //            // // Adresse invalide
 //            // set_time_limit(60);
 //            // $address = trim($object->getVille());
-//            // $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('http://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_sfGMaps_key')))));
+//            // $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('https://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_sfGMaps_key')))));
 //            // $code = (int)$xml->Response->Status->code;
 //            // if (200 == $code) {
 //            // // Adresse correcte

+ 2 - 2
plugins/catalyz/lib/czUtils.class.php

@@ -20,7 +20,7 @@ class czUtils {
 
 	public static function getLatitudeAndLongitude($address) {
 $result = false;
-        $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('http://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_gmap')))));
+        $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('https://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_gmap')))));
         $code = (int)$xml->Response->Status->code;
 		//printf("[%d] %s\n", $code, $address);
         if (200 == $code) {
@@ -39,7 +39,7 @@ $result = false;
             // // Adresse invalide
             // set_time_limit(60);
             // $address = trim($object->getVille());
-            // $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('http://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_sfGMaps_key')))));
+            // $xml = simplexml_load_string(utf8_encode(file_get_contents(sprintf('https://maps.google.com/maps/geo?q=%s&output=xml&key=%s', urlencode($address), sfConfig::get('app_sfGMaps_key')))));
             // $code = (int)$xml->Response->Status->code;
             // if (200 == $code) {
             // // Adresse correcte