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

Limit the number of stored notifications to 30 #8380

Merged
merged 1 commit into from Jul 20, 2015
Merged

Limit the number of stored notifications to 30 #8380

merged 1 commit into from Jul 20, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jul 20, 2015

fixes #8307

@tsteur tsteur added Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Jul 20, 2015
@tsteur tsteur added this to the 2.15.0 milestone Jul 20, 2015

while (count($session->notifications) >= $maxNotificationsInSession) {
array_shift($session->notifications);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not possible with array slice instead of the loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course it's possible but bit more complex since we want to remove the first once. I had a array_slice first but prefer it this way

@tsteur tsteur removed the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Jul 20, 2015
tsteur added a commit that referenced this pull request Jul 20, 2015
Limit the number of stored notifications to 30
@tsteur tsteur merged commit 758dc38 into master Jul 20, 2015
@tsteur tsteur deleted the 8307 branch July 20, 2015 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants