Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
afi
opacce
Commits
6cc3453f
Commit
6cc3453f
authored
Jun 11, 2018
by
Laurent
Browse files
dev #76258 fix JS_STAT parser for Matomoto
parent
e0e1dfd1
Pipeline
#4357
passed with stage
in 34 minutes and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
VERSIONS_WIP/76258
VERSIONS_WIP/76258
+1
-0
library/Class/AdminVar/JsStat.php
library/Class/AdminVar/JsStat.php
+1
-1
tests/scenarios/piwik/PiwikTest.php
tests/scenarios/piwik/PiwikTest.php
+1
-1
No files found.
VERSIONS_WIP/76258
0 → 100644
View file @
6cc3453f
- ticket #76258 : Piwik/Matomoto fixe l'extraction du siteId du code javascript
\ No newline at end of file
library/Class/AdminVar/JsStat.php
View file @
6cc3453f
...
...
@@ -73,6 +73,6 @@ class Class_AdminVar_JsStat {
public
function
getPiwikSiteId
()
{
$script
=
Class_AdminVar
::
get
(
'JS_STAT'
);
preg_match_all
(
"/setSiteId\',([^\]]+)\]\)/i"
,
$script
,
$matches
);
return
isset
(
$matches
[
1
][
0
])
?
trim
(
$matches
[
1
][
0
])
:
''
;
return
isset
(
$matches
[
1
][
0
])
?
trim
(
$matches
[
1
][
0
]
,
"
\t\n\r\0\x0B
'
\"
"
)
:
''
;
}
}
\ No newline at end of file
tests/scenarios/piwik/PiwikTest.php
View file @
6cc3453f
...
...
@@ -46,7 +46,7 @@ class PiwikFixtures {
(function() {
var u=
\"
//sandbox.pergame.net/piwik/
\"
;
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId',
8
]);
_paq.push(['setSiteId',
'8'
]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment