diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-12-08 02:25:02 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-12-08 02:25:02 +0300 |
commit | f6476fa9a8e7f753e67977b6ec681f71ec3c5fb0 (patch) | |
tree | 4f02f267c28a173bbdd2b3a8dc9a1f64b7e602ee /plugins/SitesManager | |
parent | 82ce0b5acee9729872dbb24d7223a1a0372e92d4 (diff) |
Check whether known URL starts with path if defined, do no longer match subdomains
Diffstat (limited to 'plugins/SitesManager')
-rw-r--r-- | plugins/SitesManager/SitesManager.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php index 4b686e2bde..ca3f2757b9 100644 --- a/plugins/SitesManager/SitesManager.php +++ b/plugins/SitesManager/SitesManager.php @@ -114,8 +114,11 @@ class SitesManager extends \Piwik\Plugin { $idSite = (int) $idSite; + $urls = API::getInstance()->getSiteUrlsFromId($idSite); + // add the 'hosts' entry in the website array - $array['hosts'] = $this->getTrackerHosts($idSite); + $array['urls'] = $urls; + $array['hosts'] = $this->getTrackerHosts($urls); $website = API::getInstance()->getSiteFromId($idSite); $array['exclude_unknown_urls'] = $website['exclude_unknown_urls']; @@ -252,9 +255,8 @@ class SitesManager extends \Piwik\Plugin * @param int $idSite * @return array */ - private function getTrackerHosts($idSite) + private function getTrackerHosts($urls) { - $urls = API::getInstance()->getSiteUrlsFromId($idSite); $hosts = array(); foreach ($urls as $url) { $url = parse_url($url); |