Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoregon w. stemle <github@iiegn.de>2017-02-18 14:45:40 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-02-18 14:45:40 +0300
commit5b8619fb355c8a1d86976b324b3feda381dec8ef (patch)
tree0271f3e0b2ac38c09dbec4fcd0f175d7f224deed
parent6fab62e2229f9efadbcf43ff541b46f007fc6323 (diff)
Fix #11332 (#11333)
Change '//' comment to '/* ... */' to avoid interference with html/js optimisers.
-rw-r--r--plugins/Morpheus/templates/javascriptCode.twig2
-rw-r--r--tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php12
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml2
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Morpheus/templates/javascriptCode.twig b/plugins/Morpheus/templates/javascriptCode.twig
index f54bbf1960..8c18b848a7 100644
--- a/plugins/Morpheus/templates/javascriptCode.twig
+++ b/plugins/Morpheus/templates/javascriptCode.twig
@@ -1,7 +1,7 @@
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
- // tracker methods like "setCustomDimension" should be called before "trackPageView"
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
{$options} _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
diff --git a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
index f4eb5d799b..30ddbd7cd6 100644
--- a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
+++ b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
@@ -39,7 +39,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
_paq.push([\"setCookieDomain\", \"*.localhost\"]);
_paq.push([\"setDomains\", [\"*.localhost/piwik\",\"*.another-domain/piwik\",\"*.another-domain/piwik\"]]);
@@ -78,7 +78,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
@@ -116,7 +116,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
// you can set up to 5 custom variables for each visitor
_paq.push([\"setCustomVariable\", 1, \"name\", \"value\", \"visit\"]);
@@ -163,7 +163,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
// you can set up to 5 custom variables for each visitor
_paq.push([\"setCustomVariable\", 1, \"name\", \"value\", \"visit\"]);
@@ -207,7 +207,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -244,7 +244,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = '&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
// you can set up to 5 custom variables for each visitor
_paq.push(["setCustomVariable", 1, "abc\"def", "abc\"def", "visit"]);
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
index d8a851d3c8..6c8629bcf7 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
@@ -2,7 +2,7 @@
<result>&lt;!-- Piwik --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var _paq = _paq || [];
- // tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot;
+ /* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {