Commit Graph

48 Commits

Author SHA1 Message Date
Marcin Kurczewski
e95b8d93d8 Simplified view management 2014-05-18 21:59:56 +02:00
Marcin Kurczewski
5f246d7a51 Improved support for no Javascript 2014-05-18 21:32:47 +02:00
Marcin Kurczewski
2a6f047c28 Removed ?json in favor of X-Ajax 2014-05-18 21:32:47 +02:00
Marcin Kurczewski
a4f7c80fe2 Added HTTP error support 2014-05-17 00:02:02 +02:00
Marcin Kurczewski
e84f8096bd Removed legacy functions 2014-05-17 00:02:01 +02:00
Marcin Kurczewski
329f6a0259 Fixed account activation links 2014-05-07 21:30:37 +02:00
Marcin Kurczewski
505d08bb08 Added unit test 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
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
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
70f187c431 Moved listing tag relations to API 2014-05-04 09:48:51 +02:00
Marcin Kurczewski
26323f996b Moved tag autocompleting to API 2014-05-04 09:45:41 +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
0b058565ba Fixed activation, password reset and registration 2014-05-03 23:23:13 +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
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
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
0ad39c241e Fixed start time placement 2014-05-02 13:51:20 +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
0a7fc387ac Simplified auth 2014-05-01 22:11:05 +02:00
Marcin Kurczewski
81e43286b5 Newest chibi-core 2014-04-29 21:35:29 +02:00
Marcin Kurczewski
0ef5f1b46d Absolute paths used where necessary
- No random chdir() calls
- No more exceptions when executing scripts from dirs other than root
- find-posts.php prints absolute paths making piping more useful
2013-11-23 20:52:41 +01:00
Marcin Kurczewski
7b473ba06f Low-level refactor to core.php 2013-11-17 14:24:39 +01:00
Marcin Kurczewski
a3aa9c3077 Internals (II) 2013-10-09 19:25:56 +02:00
Marcin Kurczewski
3ba0d60d78 Reorganized structure; 404 support 2013-10-05 17:12:51 +02:00
Marcin Kurczewski
3a77bb7c59 Registration sketch 2013-10-05 13:15:48 +02:00