Commit Graph

811 Commits

Author SHA1 Message Date
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
ef4fd57927 Newest chibi-core 2014-04-28 00:47:13 +02:00
Marcin Kurczewski
a312f02fdc Background in inputs set to white 2014-04-27 16:01:50 +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
02be024bc4 Fixed #74 2014-04-08 17:06:00 +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
fba6a50251 Tweaks to tag relations
* Fixed tag relations background if there are no related tags
* Related tags link to search (LMB adds tag, MMB searches for it in new tab)
2014-03-10 01:37:26 +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
e48826dd72 Fixed prev/next post clicking in chrome 2014-03-09 22:09:31 +01:00
Marcin Kurczewski
4879ba94b0 Fixed problem with keyboard shortcuts on Flash
Previous attempt - f226c3eb0c.
Approach introduced in this commit is theoretically much better, but it still
might not be perfect.
2014-03-05 22:40:50 +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