DiscussionModel, CategoriesController, and You in 2.1b1
I have been playing around with the beta 1 release and looking at the migration path for a community I run. One of the core features I currently use in 2.0.18.x is overriding the category discussion sort order per category. E.g. the news category is sorted by date of discussion, our watercooler category is sorted by date of last comment, and our archive is sorted by discussion ID.
I have been doing this in an event handler called DiscussionModel_BeforeGet_Handler and changing the SortField and SortDirection per my desired configuration. This has worked wonderfully the past year.
This does not work in 2.1b1.
I traced it back to a change in the CategoriesController index function. When setting the discussion data, it uses a new function in the discussion model called GetWhere. In 2.0, this was just Get. Assuming this is an intentional change, I tested reverting it to a Get and it seemed to work the same. On top of this, my sorting plugin works without change.
I don't like modifying core files if possible, any thoughts?
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.