Commit Graph

811 Commits

Author SHA1 Message Date
Marcin Kurczewski
b13c221a96 Fixed default sort style was set to ascending 2014-03-03 21:39:24 +01:00
Marcin Kurczewski
806aa0f197 Freshened up syntax help 2014-03-03 21:39:21 +01:00
Marcin Kurczewski
95bcc89aa6 Switched to MarkdownExtra implementation
It supports tables!
2014-03-03 21:29:12 +01:00
Marcin Kurczewski
b86362b366 Minor tweaks to search aliases 2014-03-03 21:29:12 +01:00
Marcin Kurczewski
6470704f43 Added order:fav_date 2014-03-03 21:29:12 +01:00
Marcin Kurczewski
1081dfb718 Hidden posts can be viewed by moderators 2014-03-03 21:29:12 +01:00
Marcin Kurczewski
aad6393f9a Fixed changing password 2014-03-02 19:09:05 +01:00
Marcin Kurczewski
b9a50f9e14 Fixed password reset and account activation 2014-03-02 18:47:46 +01:00
Marcin Kurczewski
2af8a941ff Fixed user list on Chrome w/ endless pagination 2014-03-02 18:45:53 +01:00
Marcin Kurczewski
66229e86be Version upgrade (0.7.0) 2014-03-02 17:19:48 +01:00
Marcin Kurczewski
6d0ee4e03a Newest chibi-core 2014-03-02 17:18:58 +01:00
Marcin Kurczewski
94412a25bb Fixed obscure search alias bug
When trying to search for hidden or disliked posts, it was impossible to search
by any aliases because of some hardcoded stuff. This commit removes the
hardcoded part altogether and fixes aliases support for these search terms.
2014-02-28 21:02:00 +01:00
Marcin Kurczewski
426e104bbe Added special:fav search aliases
It displays favorites of user currently logged in.
2014-02-28 20:57:06 +01:00
Marcin Kurczewski
fa251e60b6 Added :like and :dislike search aliases 2014-02-28 20:54:25 +01:00
Marcin Kurczewski
34b9a80ba7 Moved Sql and Database.php to remote project 2014-02-28 20:44:35 +01:00
Marcin Kurczewski
82b0d9a63a Newest chibi-core 2014-02-27 15:04:36 +01:00
Marcin Kurczewski
06cdebaccb Fixed colors in tags pagination
Each page had recalculated tag opacity on its own. Now it's calculated against
global maximum.
2014-02-25 13:08:41 +01:00
Marcin Kurczewski
c29a002c06 Fixes of previous commit... 2014-02-24 21:45:47 +01:00
Marcin Kurczewski
cb489d1eca SQL operator refactor
* Added few new operators that were left hardcoded
* Changed "Operator" to "Functor"
* Better hierarchy - less mess
* Serialized SQL queries should contain fewer braces
2014-02-24 21:38:09 +01:00
Marcin Kurczewski
a1378c98b4 Faster entity counting
All ORDER BY is discarded when counting entities in search services.
2014-02-24 16:50:16 +01:00
Marcin Kurczewski
e725f8d554 Faster special:liked/disliked computing 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
e43881e03f Better debug 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
ff8bb761ee Added comment preloading 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
3a2a686b6c Faster preloading 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
e6b37afa8c Changed /comments behaviour
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.
2014-02-24 16:50:16 +01:00
Marcin Kurczewski
b144321c76 New Sql operators, because they may come in handy 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
ae09f20910 Fixed date: post search token 2014-02-24 16:50:16 +01:00
Marcin Kurczewski
ec16073539 Fixes to SqlSelectStatement 2014-02-24 16:50:15 +01:00
Marcin Kurczewski
0b10221fed Fixed small bugs in search services 2014-02-24 00:11:01 +01:00
Marcin Kurczewski
2aefafa473 Favoriting a post automatically votes it up now
It's still possible for user to withdraw his vote afterwards for whatever
reason.
2014-02-23 22:46:51 +01:00
Marcin Kurczewski
72946c3922 Fixed download and arrows transparency 2014-02-23 22:04:26 +01:00
Marcin Kurczewski
975da67d33 Fixed tag list search styles
Search styles contained 'pending' option when staff was activation enabled
2014-02-23 22:04:26 +01:00
Marcin Kurczewski
f2510ac8c0 Added focus color to comment links 2014-02-23 22:04:26 +01:00
Marcin Kurczewski
4455284bdb Added a few search aliases
Each of "idmin", "datemax" etc got "id_min", "date_max" variant alias.
Additionally, "id" got new "ids" alias.
2014-02-23 22:04:26 +01:00
Marcin Kurczewski
5827626deb Search services refactor
Code rerlated to search query parsing moved to separate classes.
2014-02-23 22:03:59 +01:00
Marcin Kurczewski
4ce4ea6f70 More straightforward next/prev post calculation
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.
2014-02-23 10:03:05 +01:00
Marcin Kurczewski
a4fadb218b Fixed binding too many values to PDO statements 2014-02-23 10:00:21 +01:00
Marcin Kurczewski
f59b92e06c Fixed showing hidden posts in /comments
If user has no privileges to list the hidden posts, comments on such posts
won't show in /comments anymore.
2014-02-23 09:27:50 +01:00
Marcin Kurczewski
9eee8ba612 Mass tag: friendler pagination
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.)
2014-02-22 23:51:25 +01:00
Marcin Kurczewski
f783552820 Fixed appearance of editing flash and youtube posts 2014-02-22 23:37:48 +01:00
Marcin Kurczewski
c0f52ecf28 Fixed HTML injection in some forms 2014-02-22 23:37:30 +01:00
Marcin Kurczewski
395ac3033f Fixed HTML validation 2014-02-22 19:47:33 +01:00
Marcin Kurczewski
6af3a0e42b SQL overhaul: introducing tree-like queries
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
2014-02-22 19:40:10 +01:00
Marcin Kurczewski
1baceb5816 Fixed tag pagination on endless scrolling 2014-02-21 20:24:37 +01:00
Marcin Kurczewski
0b6a0337fe Exit confirmation tweaks in post upload
Confirmation is disabled after user removes last file from the upload queue.
It's enabled again whenever user adds something.
2014-02-21 20:24:37 +01:00
Marcin Kurczewski
4b08686393 Added lightbox to post uploads 2014-02-21 20:24:37 +01:00
Marcin Kurczewski
2bac28a553 More capable privilege system
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.
2014-02-21 20:24:37 +01:00
Marcin Kurczewski
28037af029 Registered users can mass tag their own posts 2014-02-21 20:24:37 +01:00
Marcin Kurczewski
4420fa588d Post list errors are shown in nicer way 2014-02-21 20:24:37 +01:00
Marcin Kurczewski
db8e13ec35 Merging and renaming tags yields status messages
Previously, it just redirected back to tag list without any kind of
notification about success.
2014-02-21 20:24:37 +01:00