Skip to content
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

Make sure to trigger Sites.getSites event when a new Site instance is created #10990

Merged
merged 1 commit into from Dec 12, 2016

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 11, 2016

Background: In Piwik 2.13 we removed the Site.setSite event because it is slow. So in some cases it may not actually trigger a Sites.setSites event when a site is loaded. For example when doing new Site(). I think in this case we should still trigger that event if the site did not exist yet because we do not call it very often and not in a loop for all sites etc. This is useful since new Site is used eg in Controller and for such cases we should trigger this event.

… created

Background: In Piwik 2.13 we removed the `Site.setSite` event because it is slow. So in some cases it may not actually trigger a `Sites.setSites` event when a site is loaded. For example when doing `new Site()`. I think in this case we should still trigger that event if the site did not exist yet because we do not call it very often and not in a loop for all sites etc. This is useful since `new Site` is used eg in `Controller` and for such cases we should trigger this event.
@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review labels Dec 11, 2016
@tsteur tsteur added this to the 3.0.0-rc milestone Dec 11, 2016
@tsteur tsteur merged commit d691b30 into 3.x-dev Dec 12, 2016
@tsteur tsteur deleted the sites_construct_event branch December 12, 2016 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant