* Added few new operators that were left hardcoded
* Changed "Operator" to "Functor"
* Better hierarchy - less mess
* Serialized SQL queries should contain fewer braces
Instead of showing comments chronologically, group them into posts, then sort
the posts by last comment date. Reason: improved comment context delivery
makes discussion bumping possible (no matter how old it is) and discussion is
what comments are about.
Comment count is limited to 5 per post.
Instead of getting all three rows at once using abs(id1-id2)<=1, it now asks DB
explicitly about id-1 and id+1. Even though it uses more SQL queries, it's
actually slightly faster.
If user is in mass tag mode and changes target tag but doesn't change the
query, he now remains at the same page. (Concerns only users who have disabled
endless scrolling.)
Reason: until now, PostSearchService was using magic to get around the biggest
limitation of SqlQuery.php: it didn't support arbitrary order of operations.
You couldn't join with something and tell then to select something from it.
Additionally, forging UPDATE queries was a joke. The new Sql* classes replace
SqlQuery completely and address these issues. Using Sql* classes might be
tedious and ugly at times, but it is necessary step to improve model layer
maintainability.
It is by no menas complete implementation of SQL grammar, but for current needs
it's enough, and, what's most important, it is easily extensible.
Additional changes:
* Added sorting style aliases
- fav_count
- tag_count
- comment_count
* Sorting by multiple tokens in post search is now possible
* Searching for disliked posts with "special:disliked" always yields results
(even if user has disabled showing disliked posts by default)
* More maintainable next/prev post support
Following privileges for post actions can now understand different settings for
everyone and for uploader:
* Scoring posts
* Featuring posts
* Flagging posts
* Favoriting posts
Additionally, privilege for flagging users can now understand different
settings for everyone and for the user that is currently logged in.
In other words: with this update admin can configure privileges so that scoring
own posts or flagging oneself will be prohibited, while scoring other people's
posts or flagging others will be okay.
Whenever DOM update event handlers were executed, jQuery bindings were appended
instead of being replaced. It resulted in funny scenarios like starting to show
multiple confirmation dialogs when trying to delete a post, after
adding/removing it from favorites.