1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 10:11:43 +02:00
Commit Graph

169 Commits

Author SHA1 Message Date
Toby Zerner
281f014eaa Don't attempt deletion if the user doesn't have an avatar 2015-05-07 16:54:26 +09:30
Toby Zerner
8abaef5884 Actually use the calculated offset 2015-05-07 16:54:14 +09:30
Toby Zerner
59562b3246 Move some API error handling code around. It still sucks though 2015-05-07 16:08:20 +09:30
Toby Zerner
04c862f5a3 Add preliminary avatar resizing 2015-05-07 13:59:07 +09:30
Toby Zerner
0a5f6ac94d Add pagination links to JSON-API index actions 2015-05-07 08:22:15 +09:30
Toby Zerner
14b1a0dc4f Change mergeInto return signature; only merge posts if same user 2015-05-07 06:38:40 +09:30
Toby Zerner
1a83c6df4f Fix signup error 2015-05-06 12:12:31 +09:30
Toby Zerner
0398ae923e Fix FontAwesome path 2015-05-06 12:12:22 +09:30
Toby Zerner
7906bbd986 Add user group badges 2015-05-06 11:25:19 +09:30
Toby Zerner
abf49fd07a Fix content attribute decoding into an object 2015-05-06 11:24:02 +09:30
Toby Zerner
591de0b4c2 Collect gambits that were matched and applied 2015-05-06 11:23:35 +09:30
Toby Zerner
7c441f80d4 Add shortcut API to serialize attributes 2015-05-06 11:23:12 +09:30
Toby Zerner
a40ef46aa8 Delete previous avatar when uploading a new one 2015-05-06 11:22:35 +09:30
Toby Zerner
e2ab767cb9 Fix dud call in magic method 2015-05-05 17:31:29 +09:30
Toby Zerner
0e38fa0156 Clean up post type heritable view arguments 2015-05-05 17:29:43 +09:30
Toby Zerner
2e229c6afb Precursor to storing extension providers for later use 2015-05-05 17:05:47 +09:30
Toby Zerner
7e1b343900 Add a base ServiceProvider with useful public APIs 2015-05-05 14:30:45 +09:30
Toby Zerner
3bd267c1b6 Make NotificationSender compatibleWith method static 2015-05-05 14:29:57 +09:30
Toby Zerner
3b9d40289c Return the post that was added/changed/deleted 2015-05-05 14:29:07 +09:30
Toby Zerner
2e2617e5b0 Clean up post type API 2015-05-05 14:28:40 +09:30
Toby Zerner
e6a987ff12 Clean up event handlers 2015-05-05 14:27:47 +09:30
Toby Zerner
a3f44dea62 Change API for serializer relationships 2015-05-05 14:26:53 +09:30
Toby Zerner
ab6675d19b Remove old code 2015-05-05 09:17:00 +09:30
Toby Zerner
c4e18488b9 Fix admin 2015-05-05 09:16:53 +09:30
Toby Zerner
14fc98b5b4 Add concept of "mergeable" activity posts
For example: when you rename a discussion, DiscussionRenamedPost is
created. If you rename it again immediately afterwards, then a new
DiscussionRenamedPost can be merged into the old one. This will either
result in the old one being updated with the new title, or it being
deleted all together if it was renamed back to the old title.
2015-05-04 12:19:25 +09:30
Toby Zerner
2e80cbd8a7 Update TokenAction for new architecture 2015-05-04 10:30:56 +09:30
Toby Zerner
1c47b5d909 Add ExtensionsServiceProvider to load enabled extensions 2015-05-04 08:56:19 +09:30
Toby Zerner
14ce14cbf2 Pass action in RenderView event so that handler can access actor 2015-05-04 08:55:44 +09:30
Toby Zerner
78bd2d513d Add API to define custom model relationships 2015-05-04 08:55:03 +09:30
Toby Zerner
ee6de22014 Add event to modify user search 2015-05-03 12:07:15 +09:30
Toby Zerner
5ffdd8227c Add event for registering user search gambits 2015-05-03 12:06:01 +09:30
Toby Zerner
f775c6ee0f Add delete avatar action 2015-05-03 12:05:18 +09:30
Toby Zerner
3c8c50a282 Fix incorrect function call 2015-05-03 12:04:57 +09:30
Toby Zerner
c750e32bfd Convert the rest of the API to new action architecture
Also make some tweaks:
- Merge SerializeAction::$include and
SerializeAction::$includeAvailable into a keyed boolean array
- Set defaults for SerializeAction::$limit and $limitMax
- Rename SerializeAction::$sortAvailable to $sortFields
2015-05-03 12:04:43 +09:30
Toby Zerner
963273575f Assign user input to data property on EditDiscussionCommand 2015-05-02 09:01:27 +09:30
Toby Zerner
0582d8e60f Add removed posts as an API attribute 2015-05-02 09:00:22 +09:30
Toby Zerner
20b8c13383 Update discussion/post sort semantics inline with new API actions
Instead of $sort and $order being separate, they are now a single
array, allowing multiple sort criteria: `[‘foo’ => ‘asc', ‘bar’ =>
‘desc’]`
2015-05-02 09:00:07 +09:30
Toby Zerner
44b5f1c5f3 Make sure serializers work with relations implemented with magic (via __call) 2015-05-02 08:58:28 +09:30
Toby Zerner
5de1a99816 Making a note that we should not use Actor as a singleton 2015-05-02 08:57:14 +09:30
Toby Zerner
e66a3721ee Update API action architecture
- An API action handles a Flarum\Api\Request, which is a simple object
containing an array of params, the actor, and optionally an HTTP
request object
- Most API actions use SerializeAction as a base, which parses request
input according to the JSON-API spec (creates a JsonApiRequest object),
runs the child class method to get data, then serializes it and assigns
it to a JsonApiResponse (standard HTTP response with a
Tobscure\JsonApi\Document as content)
- The JSON-API request input parsing is subject to restrictions as
defined by public static properties on the action (i.e. extensible)
- Also the actor is given to the serializer instance now, instead of
being a static property
2015-05-02 08:56:43 +09:30
Toby Zerner
ce0c8903a5 Extensibility: data when starting a new discussion 2015-05-02 08:39:44 +09:30
Toby Zerner
347a595d7a Add an event to register discussion gambits 2015-05-02 08:12:30 +09:30
Toby Zerner
cb5baf8953 Add API to collect posts that were removed during an action
This is useful for both the Sticky and Categories extensions, where if
you sticky a discussion and then immediately unsticky it, or if you
move it to a category and then immediately move it back, the last
“activity” post will be removed.
2015-05-02 08:12:09 +09:30
Toby Zerner
40715203a5 Define assets in a more appropriate spot, make extensible 2015-05-02 08:10:06 +09:30
Toby Zerner
4c42be1362 Extract config into database 2015-05-02 08:07:51 +09:30
Toby Zerner
0fc1691103 Merge remote-tracking branch 'upstream/master' 2015-04-25 22:45:27 +09:30
Toby Zerner
153098c08f Return more relations when a discussion is created 2015-04-25 22:37:25 +09:30
Toby Zerner
6669f340dd Fix read discussion command action 2015-04-25 22:37:04 +09:30
Toby Zerner
feb2891f56 Allow custom relation to be specified as string 2015-04-25 22:36:34 +09:30
Toby Zerner
8430b67d5b Add BootForum event so extensions can add assets 2015-04-25 22:35:41 +09:30