Skip to content
Snippets Groups Projects
Commit c5fefde7 authored by efalcy's avatar efalcy
Browse files

hotline #52810 : replace protected by public method in Jsstat

parent a6e82965
Branches
Tags
3 merge requests!2334Master,!2301Master,!2270hotline #52810 : in piwik context, directly retreive piwik site id
Pipeline #2175 passed with stage
in 11 minutes and 7 seconds
......@@ -32,7 +32,7 @@ class Class_AdminVar_JsStat {
public function isPiwik() {
return ($this->_getPiwikSiteId() != '');
return ($this->getPiwikSiteId() != '');
}
......@@ -40,7 +40,7 @@ class Class_AdminVar_JsStat {
return
$this->isGoogleAnalytics()
? $this->_getGoogleAnalyticsId()
: $this->_getPiwikSiteId();
: $this->getPiwikSiteId();
}
......@@ -67,14 +67,9 @@ class Class_AdminVar_JsStat {
}
protected function _getPiwikSiteId() {
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]) : '';
}
public function getPiwikSiteId() {
return $this->_getPiwikSiteId();
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment