Commit graph

621 commits

Author SHA1 Message Date
Marcin Kurczewski
67e4272f3e Changes to privilege system 2014-05-05 17:47:30 +02:00
Marcin Kurczewski
47f7ff3490 Moved account activation and password reset to API 2014-05-04 18:32:58 +02:00
Marcin Kurczewski
893e841a87 Organized password reset and account activation 2014-05-04 18:32:57 +02:00
Marcin Kurczewski
83239a492d Moved account registering to API 2014-05-04 18:32:57 +02:00
Marcin Kurczewski
4c66ca2b01 Fixed displaying login errors 2014-05-04 15:11:58 +02:00
Marcin Kurczewski
b0bbdde112 Moved user account settings to API 2014-05-04 15:11:58 +02:00
Marcin Kurczewski
816859c3e3 Moved user retrieval to API 2014-05-04 13:43:52 +02:00
Marcin Kurczewski
9e2e3ceb7f Simplified views in UserController 2014-05-04 12:12:06 +02:00
Marcin Kurczewski
8b44a248cc Moved user account removal to API 2014-05-04 10:57:12 +02:00
Marcin Kurczewski
48e274234e Moved user registration accepting to API 2014-05-04 10:47:56 +02:00
Marcin Kurczewski
243f22542d Moved user listing to API 2014-05-04 10:32:32 +02:00
Marcin Kurczewski
f74213bafb Reduced boilerplate by using default privileges 2014-05-04 10:24:59 +02:00
Marcin Kurczewski
588efcb908 Moved user (un)banning to API 2014-05-04 10:16:05 +02:00
Marcin Kurczewski
c86854dcb1 Moved user flagging to API 2014-05-04 10:15:29 +02:00
Marcin Kurczewski
d2319465c1 Moved tag merging to API 2014-05-04 10:03:21 +02:00
Marcin Kurczewski
5d2c5a2053 Moved tag renaming to API 2014-05-04 10:03:03 +02:00
Marcin Kurczewski
5c003588fa Made tag retrieval use entity conversion again
Previously engine used raw database rows for performance boost. The
benefits were negligibly small, therefore it was changed so that it
returns full entities again. That way serializing job return values
for HTTP API should be easier in the future.
2014-05-04 09:48:51 +02:00
Marcin Kurczewski
70f187c431 Moved listing tag relations to API 2014-05-04 09:48:51 +02:00
Marcin Kurczewski
ebfa0a71aa Removed obsolete method call
(Removed code is already executed in tag editing jobs.)
2014-05-04 09:45:41 +02:00
Marcin Kurczewski
26323f996b Moved tag autocompleting to API 2014-05-04 09:45:41 +02:00
Marcin Kurczewski
1787604ac1 Fixed filtering logs 2014-05-04 09:12:23 +02:00
Marcin Kurczewski
923207fdfa Organized common paging code into abstraction 2014-05-04 09:11:39 +02:00
Marcin Kurczewski
97c17c68a0 Moved tag listing to API 2014-05-04 08:42:18 +02:00
Marcin Kurczewski
259eabfaaa Merged branch 'master' into api 2014-05-03 23:29:16 +02:00
Marcin Kurczewski
3d6564f7a8 Fixed erroreous redirects 2014-05-03 23:27:00 +02:00
Marcin Kurczewski
0b058565ba Fixed activation, password reset and registration 2014-05-03 23:23:13 +02:00
Marcin Kurczewski
c3a20ad721 Added unused tag purging in post tag edit jobs 2014-05-03 22:53:55 +02:00
Marcin Kurczewski
425517f0ae Rearranged class and file names 2014-05-03 22:18:41 +02:00
Marcin Kurczewski
758f5bd134 Moved post content and thumbnail retrieval to API 2014-05-03 22:14:00 +02:00
Marcin Kurczewski
9f4d97aa23 Moved post retrieval to API 2014-05-03 20:34:07 +02:00
Marcin Kurczewski
cebff0ef4e Moved post featuring to API 2014-05-03 19:53:33 +02:00
Marcin Kurczewski
ee79e1753e Moved post scoring to API 2014-05-03 19:53:20 +02:00
Marcin Kurczewski
2eaab49d35 Moved post (un)favoriting to API 2014-05-03 19:53:19 +02:00
Marcin Kurczewski
db8eab1c5c Moved post removal to API 2014-05-03 19:53:03 +02:00
Marcin Kurczewski
38a9e154f8 Moved post un/hiding to API 2014-05-03 19:52:39 +02:00
Marcin Kurczewski
c0dce6775e Moved post flagging to API 2014-05-03 19:26:00 +02:00
Marcin Kurczewski
b2b7064ff0 Moved post editing to API 2014-05-03 19:26:00 +02:00
Marcin Kurczewski
6ae4cea8bb Moved post upload to API 2014-05-03 19:26:00 +02:00
Marcin Kurczewski
f383a5ed21 Moved JobArgs to Jobs
Reason: trying to make unique string for every possible argument in
global fashion is difficult. For example it would make sense for
EditPostRelationsJob to accept argument named "post-ids", but it
wouldn't make much sense for AddPostJob to accept "post-ids" since it
doesn't tell much. Thus, common arguments are going to be defined in
top-level AbstractJob for ease of control, while more job-specific
arguments are going to be specified in respective job implementations.
2014-05-03 19:25:59 +02:00
Marcin Kurczewski
162b131435 Moved tag toggling to API 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
7c1b8ca4d5 Renamed LogController methods and moved to API 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
aeb73e2a5c Renamed IndexController class and methods 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
e857032a73 Made logout redirect to last visted page 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
8b8564309d Split login method into View and Action 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
ffeefd06c6 Moved post listing to API 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
c0a7fe5209 Moved comment listing to API 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
6a28be5e3e Moved comment removal to API 2014-05-03 19:25:59 +02:00
Marcin Kurczewski
0ad39c241e Fixed start time placement 2014-05-02 13:51:20 +02:00
Marcin Kurczewski
16c5d6961b More robust argument handling 2014-05-02 09:51:34 +02:00
Marcin Kurczewski
3cdaa85511 Added subprivilege authentication 2014-05-02 09:42:03 +02:00
Marcin Kurczewski
334cca8197 Changed default access rank from admin to none 2014-05-02 08:14:16 +02:00
Marcin Kurczewski
902aed7278 Introducing API
Right now there's a lot of messy code in controllers. Furthermore, there
is no way to interact with szurubooru via vanilla HTTP, since API is
next to non-existent. So, basing upon my experiences from another
project, I plan to:

- Create actual API. It is going to consist of well-defined "jobs" that
  do things currently done by controllers. Benefits of such approach are
  as follows:
  - defining them in their own classes allows to clean up code a lot,
  - it allows to abstract from input method (POST data, part of URL,
	whatever), and leave processing of these to controllers,
  - it allows to make proxy controller, whose purpose would be to let
	users interact with API (jobs) directly in well-documented and
	consistent way.
- Make controllers responsible only for mediating between views and API.
  Behavior of these may remain inconsistent, since views they're talking
  to are also messy to begin with. Such controllers might be removed
  altogether in the future in favor of making views talk to API directly
  through previously mentioned ApiController.
- Organize all sorts of privilege checking and possibly other stuff into
  methods within jobs.
- Actually distinguish POST from GET requests.
- Leave POST-only controller methods as Actions, but rename GET-only
  methods to Views. Example: editAction for editing comments, but
  listView for showing comment list. The choice of these suffixes might
  be subject to changes in future.
- Get rid of ?json and $context->transport. They now look like disease
  to me.

This commit introduces job system and converts CommentController to use
the new API.
2014-05-01 23:35:05 +02:00
Marcin Kurczewski
feec48ed83 AJAX doesn't rely on StatusHelper
Since the purpose that StatusHelper was mainly created for no longer
holds, it was simplified to Messenger. It is now is used to transport
simple messages to views and still transports info whether the message
is about success or failure.
2014-05-01 23:34:44 +02:00
Marcin Kurczewski
925fccbd17 Moved authentication check to Access 2014-05-01 22:11:05 +02:00
Marcin Kurczewski
0a7fc387ac Simplified auth 2014-05-01 22:11:05 +02:00
Marcin Kurczewski
e673bdb50c Fixed privilege checking 2014-05-01 16:06:38 +02:00
Marcin Kurczewski
d08c15b9e7 Refactor to thumbnail generating 2014-04-30 09:54:04 +02:00
Marcin Kurczewski
c52531e8fc Increasing readability 2014-04-30 08:08:24 +02:00
Marcin Kurczewski
c18c9ec680 Lines wrapped again 2014-04-30 00:11:53 +02:00
Marcin Kurczewski
396ea97cad PrivilegesHelper shortened to Access
Methods are shorter, too
2014-04-29 23:53:47 +02:00
Marcin Kurczewski
81e43286b5 Newest chibi-core 2014-04-29 21:35:29 +02:00
Marcin Kurczewski
da1f5d8ab2 Split long lines in views 2014-04-27 16:01:50 +02:00
Marcin Kurczewski
60208407ea Shorthand php echo 2014-04-27 16:01:50 +02:00
Marcin Kurczewski
f495774be4 New exception style; split long lines in php 2014-04-27 16:01:45 +02:00
Marcin Kurczewski
cc51d943e2 Fixed CBC encryption - added IV to cookie 2014-04-21 09:31:59 +02:00
Marcin Kurczewski
f1bc9c18b9 Fixed retrieving display string from enums 2014-04-21 00:17:16 +02:00
Marcin Kurczewski
1ec5161faf Fixed post showing on MySQL driver 2014-04-21 00:16:14 +02:00
Marcin Kurczewski
4847448a26 Little fixes for small layouts 2014-04-20 11:39:26 +02:00
Marcin Kurczewski
70f55f65b4 Revived MySQL support 2014-04-16 13:05:24 +02:00
Marcin Kurczewski
ccf7464d6f Changed ECB to CBC 2014-04-12 17:04:32 +02:00
Marcin Kurczewski
2b33bf44d2 Text case conversion moved to gist 2014-04-12 16:25:07 +02:00
Marcin Kurczewski
d3e135ea15 Enhanced support for new video posts (closed #75) 2014-04-09 14:19:51 +02:00
Marcin Kurczewski
74b2f935c3 Fixed video dimensions 2014-04-08 17:09:13 +02:00
Marcin Kurczewski
af1828a9e8 Added HTML5 video support (closed #75) 2014-04-08 16:54:36 +02:00
Marcin Kurczewski
78d0b07c5c Version upgrade (0.7.1) 2014-03-13 20:53:17 +01:00
Marcin Kurczewski
a2b647432c Better spoiler and tags behaviour 2014-03-13 20:53:17 +01:00
Marcin Kurczewski
87806bd015 Fixed ATX style header parsing
Markdown Extra that we recently switched to has different implementation from
Markdown (including, but not limited to, regexes), so some of the overwritten
callbacks stopped working.
2014-03-13 19:45:43 +01:00
Marcin Kurczewski
73fc1830ff Tag relations don't suggest tags already used 2014-03-10 16:16:25 +01:00
Marcin Kurczewski
394c06a1c5 Added related tag suggesting on tag click 2014-03-10 01:15:48 +01:00
Marcin Kurczewski
f4d0230166 Refactor to tag autocompletion 2014-03-10 01:15:47 +01:00
Marcin Kurczewski
f7837dc190 Fixed word wrapping in registration form 2014-03-05 15:22:36 +01:00
Marcin Kurczewski
fdb7d57cf0 Fixed user list (again) 2014-03-04 18:15:16 +01:00
Marcin Kurczewski
1ce0429280 Added order:file_size 2014-03-04 17:33:46 +01:00
Marcin Kurczewski
d6f02fb724 Added "upvoted" tab 2014-03-03 21:56:10 +01:00
Marcin Kurczewski
2e3fdf98a0 Fixed 404 page appearance 2014-03-03 21:46:36 +01:00
Marcin Kurczewski
c633118774 Fixed automatic post featuring 2014-03-03 21:39:24 +01:00
Marcin Kurczewski
2c73f60824 Fixed searching by min/max score 2014-03-03 21:39:24 +01:00
Marcin Kurczewski
ada131a7c5 Fixed small bug in date parsing 2014-03-03 21:39:24 +01:00
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
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
66229e86be Version upgrade (0.7.0) 2014-03-02 17:19:48 +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
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
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
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
Marcin Kurczewski
1624fd5f63 Tag and user list: a-z order is case insensitive 2014-02-21 20:24:06 +01:00
Marcin Kurczewski
705e3dfba1 Changed LOWER(?) to ? COLLATE NOCASE 2014-02-20 21:32:07 +01:00
Marcin Kurczewski
dd498cf18d Fixed ban and unban confirmation messages 2014-02-20 21:32:07 +01:00
Marcin Kurczewski
b86aaf90a3 Fixed and simplified tag autocompletion 2014-02-18 21:26:54 +01:00
Marcin Kurczewski
43a33e579d Tweaks to unit converter 2014-02-18 18:35:58 +01:00
Marcin Kurczewski
2bad17ebdb Fixed extension in saved posts 2014-02-18 18:35:58 +01:00
Marcin Kurczewski
1352aba438 Fixed saving post original file name to DB 2014-02-18 18:35:58 +01:00
Marcin Kurczewski
eee6421775 Post editing: quasi-popup in place of sliding unit 2014-02-18 18:35:55 +01:00
Marcin Kurczewski
65c6caa13c Freshened up sidebar 2014-02-18 16:41:36 +01:00
Marcin Kurczewski
532fe9f7e6 Added pagination to tag list 2014-02-16 20:10:38 +01:00
Marcin Kurczewski
18bfd6605d Searching: more robust entity counting 2014-02-16 20:10:38 +01:00
Marcin Kurczewski
0c5fc7e03f Fixed useless arguments 2014-02-16 20:10:38 +01:00
Marcin Kurczewski
3e99a6336c Form CSS overhaul 2014-02-16 20:10:34 +01:00
Marcin Kurczewski
4a69084a8b Upload no longer uses tabs 2014-02-16 20:00:26 +01:00
Marcin Kurczewski
7a5d97e153 Dates changed to relative form (except logs) 2014-02-16 15:16:20 +01:00
Marcin Kurczewski
620d1204f7 Changed footer appearance 2014-02-16 12:33:52 +01:00
Marcin Kurczewski
27c780602c Better looking user list 2014-02-16 12:33:52 +01:00
Marcin Kurczewski
83a966f1af Added tab wrappers 2014-02-16 12:33:48 +01:00
Marcin Kurczewski
8161bc9c88 Version upgrade (0.6.1) 2014-02-13 09:39:09 +01:00
Marcin Kurczewski
c99596d12b Added last login date to users 2014-02-13 09:10:24 +01:00
Marcin Kurczewski
b22e74c0e9 Closed #72 2014-02-05 08:35:24 +01:00
Marcin Kurczewski
6a407fc87a Fixed #73 2014-02-05 08:22:26 +01:00
Marcin Kurczewski
91b0432067 Fixed css
CSS for comments wasn't included in post-view.phtml. This manifested when user
posted a comment thruogh it (AJAX requests don't append CSS from AJAXed pages,
so added it in parent view).
2014-02-02 22:45:41 +01:00
Marcin Kurczewski
f01f55cc8b Fixed #71 2014-02-02 22:44:13 +01:00
Marcin Kurczewski
0b55dfad04 Markdown: restored ATX headers
See be3b39bf42.
It works again, but it requires putting a space after hash.
2014-02-02 19:23:52 +01:00
Marcin Kurczewski
35cdc0cf3a Refactored scripts and stylesheets
Styles, scripts and page titles are no longer set from controllers level.
Changed because it was breaking MVC pattern and led to spaghetti code.

Also, optimized JS/CSS inclusions a bit.
2014-02-01 11:24:03 +01:00
Marcin Kurczewski
d170e3b526 Closed #68 2014-02-01 11:23:59 +01:00
Marcin Kurczewski
ac1997d4d0 Refactored search case sensitivity support 2014-02-01 09:54:46 +01:00
Marcin Kurczewski
d085ffe39a Closed #70 2014-02-01 09:51:37 +01:00
Marcin Kurczewski
d01a087b30 Cosmetic changes 2014-01-27 09:21:52 +01:00
Marcin Kurczewski
36e2e5827c Closed #69 2014-01-27 09:17:36 +01:00
Marcin Kurczewski
752cbbd016 Fixed undefined method 2014-01-26 13:35:47 +01:00
Marcin Kurczewski
a869c1da1e Slightly changed comment edit log message 2014-01-25 16:44:37 +01:00
Marcin Kurczewski
100303173e Added comment editing support
In other news, editing a post doesn't reload page anymore
(yay for editing tags for Youtube posts)
2014-01-25 16:39:09 +01:00
Marcin Kurczewski
fd9433a2e3 Edit tokens moved to model 2014-01-25 15:09:20 +01:00
Marcin Kurczewski
be3b39bf42 Markdown: disabled atx-style header support
Rationale - collision with tag syntax: if #tag was first word in given line,
the line was treated like header.
2014-01-25 14:09:56 +01:00
Marcin Kurczewski
15486b6e9a Fixed problems with block-level spoilers
Block-level spoilers (= inside <h1>, <li> etc.) were left unparsed.
2014-01-14 23:20:47 +01:00
Marcin Kurczewski
1fcced20f1 Misc CSS tweaks 2014-01-06 19:25:27 +01:00
Marcin Kurczewski
56622b8e9d Last comments respect safety choice 2014-01-04 12:55:59 +01:00
Marcin Kurczewski
4a9cc4b3bc Fixed invalid SQL in some circumstances 2014-01-04 12:55:03 +01:00
Marcin Kurczewski
b1fb329fc7 Fixed silly bug
Statistics for each user in user list showed comment count instead of post
count.
2013-12-23 16:43:12 +01:00
Marcin Kurczewski
306c6478b4 Micro optimalizations
Saved 0.015s on various things, mostly thanks to new chibi-core caching
2013-12-23 10:10:03 +01:00
Marcin Kurczewski
8cfc2aeb2a Fixes for MySQL driver 2013-12-18 17:49:22 +01:00
Marcin Kurczewski
9a9220ab24 Version upgrade (0.6.0) 2013-12-18 17:38:22 +01:00
Marcin Kurczewski
6905ad047d Fixed changing access rank 2013-12-18 16:11:20 +01:00
Marcin Kurczewski
5607cfc353 Models rewrite; removed RedBeanPHP; misc changes
Pages load 1.5-2x faster
Exception trace in JSON is now represented as an array
Fixed pagination of default favorites page in user pages
Fixed thumbnail size validation for non-square thumbnails
2013-12-18 15:17:49 +01:00
Marcin Kurczewski
8c0c5269c4 Fixed 404 pages 2013-12-16 23:38:31 +01:00
Marcin Kurczewski
95961fe7d5 Added tag sorting here and there
- Title attribute in post thumbnail
- Page title in post view
- Footer in featured post
2013-12-14 16:55:07 +01:00
Marcin Kurczewski
1c6b10f966 Fixed 1px bug 2013-12-14 16:49:43 +01:00
Marcin Kurczewski
5b25250209 Optimalizations 2013-12-14 14:50:30 +01:00
Marcin Kurczewski
c7c5cde2b6 Fixed removing from favorites 2013-12-14 12:51:11 +01:00
Marcin Kurczewski
5d45d6da2c Support for MySQL 2013-12-14 12:51:08 +01:00
Marcin Kurczewski
31bc799518 Markdown: fixes related to <pre> blocks 2013-12-08 12:12:45 +01:00
Marcin Kurczewski
8f906d83bf Added active section indicator 2013-12-05 23:57:33 +01:00
Marcin Kurczewski
b8e37a234a Better looking query debug 2013-12-05 22:22:11 +01:00
Marcin Kurczewski
40e70c4305 User settings: new option to hide disliked posts 2013-12-05 22:21:15 +01:00
Marcin Kurczewski
0d3bb32e9c Refactor to HTML structure
- <script> moved outside <ul>
- Youtube posts pass W3C validation
2013-12-01 15:16:10 +01:00
Marcin Kurczewski
4c1bb44e59 Fixed rare bug in prev/next post
If tag/user/whatever from last search was deleted after viewing a post,
refreshing the page with that post would yield "Invalid tag/user/whatever"
error.

I changed it so that when retrieving previous/next post for latest search query
throws any errors, saved search query gets resetted to empty one.
2013-12-01 14:47:35 +01:00
Marcin Kurczewski
0001d38699 Further tweaks to model
- Fixed broken negative searches
- Faster search by tag / comment / submit / favorites (useless nested joins
  replaced to entity prefetch). Side effect: searching for nonexistent tags,
  users etc yields informative errors instead of "no posts to show")
- Fixed duplicated column in order clause ("ORDER BY id DESC, id DESC")
2013-11-30 19:07:39 +01:00
Marcin Kurczewski
992b9ba5ac Restored previous entity retrieval
Using temporary tables turned out to be more expensive on bigger databases.
Restoring two queries version.
2013-11-30 18:13:46 +01:00
Marcin Kurczewski
4285aff671 Fixes to preloading 2013-11-30 16:19:48 +01:00
Marcin Kurczewski
31ccb9a281 Optimalization: changed entity retrieval 2013-11-30 14:23:53 +01:00
Marcin Kurczewski
01c54d4d83 Optimalization: simplified selectors
Squash
2013-11-30 14:23:46 +01:00
Marcin Kurczewski
d7cb024f24 Refactored pagination queries 2013-11-30 13:59:29 +01:00
Marcin Kurczewski
c9a8f99f6a Optimization: preloading moved back to controllers
- Nearly twice faster page load
- Query count greatly dropped
2013-11-30 01:10:58 +01:00
Marcin Kurczewski
5a231b19c3 Bugfix to JS (unknown variable error) 2013-11-30 01:10:58 +01:00
Marcin Kurczewski
3dd3ca5d99 Optimalization: moved <script> from HEAD to footer 2013-11-30 01:10:58 +01:00
Marcin Kurczewski
1e954bb815 Optimalization: faster but dirty row retrieval 2013-11-30 01:10:55 +01:00