Skip to content
Extraits de code Groupes Projets
Valider ac7827f1 rédigé par mattab's avatar mattab
Parcourir les fichiers

fix regression when HTTPS URL is different from HTTP Tracker URL, both should...

fix regression when HTTPS URL is different from HTTP Tracker URL, both should be used in the generated tracking code refs #344
parent 3f900064
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -214,7 +214,9 @@ class Piwik ...@@ -214,7 +214,9 @@ class Piwik
self::postEvent('Piwik.getJavascriptCode', array(&$codeImpl, $parameters)); self::postEvent('Piwik.getJavascriptCode', array(&$codeImpl, $parameters));
$setTrackerUrl = 'var u="//{$piwikUrl}/";'; $setTrackerUrl = 'var u="//{$piwikUrl}/";';
if (!empty($codeImpl['httpsPiwikUrl'])) { if (!empty($codeImpl['httpsPiwikUrl'])) {
$setTrackerUrl = 'var u=((document.location.protocol === "https:") ? "https://{$httpsPiwikUrl}/" : "http://{$piwikUrl}/");';
$codeImpl['httpsPiwikUrl'] = rtrim($codeImpl['httpsPiwikUrl'], "/"); $codeImpl['httpsPiwikUrl'] = rtrim($codeImpl['httpsPiwikUrl'], "/");
} }
$codeImpl = array('setTrackerUrl' => htmlentities($setTrackerUrl)) + $codeImpl; $codeImpl = array('setTrackerUrl' => htmlentities($setTrackerUrl)) + $codeImpl;
......
Subproject commit 643984c1bab2bc48f120e3cb83fac39b270d9481 Subproject commit f5557b8bcdb2ef6936b651a39f4e4f510b83bf6c
Subproject commit 140de8db1a1795178efd8b0d2f8e6208a192e562 Subproject commit 267da78ac140e117fdc7ed351c69b729014165f2
Subproject commit 874920ab1c338a9afe24d3c7229dc5be8e741987 Subproject commit 90327ea31c298d17cf14312d4eeefad7228c54a4
Subproject commit 2073992deab2a2439fccb98c4befa1798ec6d649 Subproject commit 82ec03ae540a6118c338df6e2c8ad5b8771f9001
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter