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
WIP towards Elgg 1.9 version. #6
Conversation
@juho-jaakkola how functional is this? |
|
||
$notification_handlers = _elgg_services()->notifications->getMethods(); | ||
|
||
$class_name = get_input('upgrade_class'); |
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.
Need to whitelist available classnames.
@mrclay Oops, seems like this wasn't that functional after all. :P Feel free to replace the PR if you are in a hurry. I'm traveling a bit so I can't work on this anytime soon. |
Yeah, I'm just making notes for myself for when I work on this a little later. |
I made some updates:
The 1.8 branch has received some updates while this PR has been open. It seems the branches do not have much in common anymore anyway, so do we mind if we loose the ability to merge up from 1.8 version to 1.9? |
I think given the changes to comments and notifications in 1.9 the inability to merge up is pretty much expected |
I updated the PR to make use of the ElggUpgrade objects. (Which are still however broken.) |
I realized I may have made a bad decision while upgrading comment_tracker. In Elgg 1.8 comment_tracker saves a relationship between user and the target. When a comment is posted to the target, comment_tracker checks the user's notification settings and sends notifications. In 1.9 I made it work so that it gets the user's notification settings already at the time when user subscribes. And then it creates a separate relationship between user and target for each method (notifysite, notifyemail, etc). These relationships are what Elgg 1.9 notifications system uses by default. With this there is the problem, that the relationships do not get updated when user changes the notification methods that comment_tracker should be using. What do you think about this? Should I revert it and use the original way? (It would still be possible to use it with the 1.9 notifications system.) My original reasoning for doing it like this was to allow choosing content specific notification methods: #5 |
FWIW I stripped your PR branch to only notifyemail relationships and assumed a fresh 1.9 install. I'm still not in a position to share this yet. |
I decided with @beck24 that it's best if I revert the change I made. I'll open a new PR for the different approach. I shouldn't be making this PR from my own master anyway. |
This is just to discuss current state and to provide something to test. Do not merge anything.
admin:comment_tracker:upgrade1
etc.COMMENT_TRACKER_UNSUBSCRIBE_RELATIONSHIP
elgg_dump
register_error
inUpgrades_CommentTrackerUpgrade1->run()
views/default/js/