New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SitesManager.getSitesIdFromSiteUrl should match both HTTP and HTTPS #8072
Conversation
|
||
// return all variations of the URL | ||
return array( | ||
"http://" . $hostname, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it on purpose that we only allow http/https? Eg in mobile apps there could be URLs like fb://profile/33138223345
see http://en.wikipedia.org/wiki/Mobile_deep_linking Probably people wouldn't enter such URLs but maybe they do? Maybe we could always include the original $url
as well` Seems a bit restrictive otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could always include the original $url as well` Seems a bit restrictive otherwise
Good point. Actually it does not work yet in Piwik to create websites with URLs that have weird scheme. Right now it does prepend the proper scheme;
still I've added test case anyway to make sure getSitesIdFromSiteUrl works for those URLs.
…d integration tests
…e eg. fb://example-host
Code feedback applied, except moving protected method somewhere else. If tests will pass it should be good to merge |
SitesManager.getSitesIdFromSiteUrl should match both HTTP and HTTPS
Merged it myself as it's needed to fix System tests on master (i've already changed the sub-module to matomo-org/matomo-log-analytics#77 ) |
fixes #8070