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
Restore a trigger "onKunenaGetTopics" #4645
Conversation
Because the parameters are very different from the trigger "onKunenaGetTopics", the trigger is renamed "onKunenaGetUserTopics".
default : | ||
$finder | ||
->filterByUser($user, 'involved') | ||
->order('favorite', -1, 'ut'); | ||
break; | ||
} | ||
|
||
$categories = KunenaForumCategoryHelper::getCategories($categoryIds, $reverse, $authorise); | ||
$finder->filterByCategories($categories); | ||
if($categoryIds !== null) { |
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.
please fix codestyle. Add a space after if
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.
Sure
I just remember that, in order to work properly, it also require a modification in the "librairies/kunena/forum/topic/finder.php" so the plugin can have access to the "select".
|
Could you also add this on the pr |
The topic finder can now provide a direct access to the query select, so plugins will be able to retrieve more data when using the trigger "onKunenaGetUserTopics"
Pull Request for Issue #4643 .
Summary of Changes
Due to the modification in the Kunena core, some files (models) are not used anymore.
In the new core, the trigger "onKunenaGetTopics" is not more called, so the option "Select View: By Plugin" is not working anymore.
That patch will restore a trigger but will rename it in order to not generate side effect due to the modification in the parameters.
Testing Instructions
Create a Kunena menu and select the "By plugin" view mode.
In the header text, put "moderation".
In a plugin, put the trigger:
We removed some code for extra columns used by our moderation system