1
0
mirror of https://github.com/flarum/core.git synced 2025-08-27 10:05:47 +02:00
Commit Graph

8745 Commits

Author SHA1 Message Date
Toby Zerner
1dc495dfdd Use new event name 2016-06-03 11:03:17 +09:30
Toby Zerner
947587272a Recompile dist JS using latest version of babel 2016-06-03 11:03:11 +09:30
Toby Zerner
0c8d14b14e Use new event name 2016-06-03 11:03:04 +09:30
Toby Zerner
a27c108385 Recompile dist JS using latest version of babel 2016-06-03 11:02:58 +09:30
Toby Zerner
2c10a42d6b Use new event name 2016-06-03 11:02:48 +09:30
Toby Zerner
e16b960242 Recompile dist JS using latest version of babel 2016-06-03 11:02:43 +09:30
Toby Zerner
dce149b536 Use new event name 2016-06-03 11:02:34 +09:30
Toby Zerner
5c6089b4df Recompile dist JS using latest version of babel 2016-06-03 11:02:28 +09:30
Toby Zerner
c11738cdf5 Use new event name 2016-06-03 11:02:19 +09:30
Toby Zerner
d6b78c78bd Recompile dist JS using latest version of babel 2016-06-03 11:02:13 +09:30
Toby Zerner
999ef82d55 Use new event name 2016-06-03 11:02:05 +09:30
Toby Zerner
0e8061c32f Use new event name 2016-06-03 11:01:58 +09:30
Toby Zerner
8035415785 Recompile dist JS using latest version of babel 2016-06-03 11:01:52 +09:30
Toby Zerner
55f7fa8fdb Use new event name 2016-06-03 11:01:45 +09:30
Toby Zerner
f4e4f10624 Recompile dist JS using latest version of babel 2016-06-03 11:01:39 +09:30
Toby Zerner
b6545a5f8e Use new event name 2016-06-03 11:01:31 +09:30
Toby Zerner
b11659de2f Recompile dist JS using latest version of babel 2016-06-03 11:01:25 +09:30
Toby Zerner
f1e1efdc31 Use new event name 2016-06-03 11:01:17 +09:30
Toby Zerner
ce537f195d Recompile dist JS using latest version of babel 2016-06-03 11:01:11 +09:30
Toby Zerner
c1e593db0f Recompile dist JS using latest version of babel 2016-06-03 10:59:57 +09:30
Toby Zerner
72bff02d68 Recompile dist JS using latest version of babel 2016-06-03 10:58:39 +09:30
Toby Zerner
f902c949c4 Use new event name 2016-06-03 10:58:24 +09:30
Toby Zerner
bb2b5b0ad4 Recompile dist JS using latest version of babel 2016-06-03 10:58:11 +09:30
Toby Zerner
9c6466338c Unapprove discussions too 2016-06-03 10:58:05 +09:30
Toby Zerner
9810952d1d Recompile dist JS using latest version of babel 2016-06-03 10:57:42 +09:30
Toby Zerner
ef5fd104f7 Add option to write the config file to a different path 2016-06-03 10:55:50 +09:30
Toby Zerner
87430a20a7 Merge pull request #20 from sijad/quote-emoji
Fix quote emoji icons
2016-06-02 23:45:46 +09:30
Sjjad Hashemian
496995d55a Fix quote emoji icons 2016-06-02 15:45:04 +04:30
Toby Zerner
c3f0f3b14c Fix up some references to old classes 2016-05-29 16:01:58 +09:30
Toby Zerner
2a75581b13 Use smaller FontAwesome shim repo instead of original
components/font-awesome is ~8 MB smaller than fortawesome/font-awesome because it excludes all examples/docs. Reducing dependency filesize will be important when we want to package up a .zip for distribution.
2016-05-29 10:21:37 +09:30
Toby Zerner
7d5bc472f8 Revert "Simplify discussion/tag permission logic"
This reverts commit 01e776e2be.

Turns out that there was a good reason for the original logic... the case of per-tag moderators.
2016-05-28 20:49:43 +09:30
Franz Liedke
16f3a09856 Deduplicate emojis even after using multiple matchers
Fixes flarum/core#968.
2016-05-28 16:22:31 +09:00
Toby Zerner
9661e05c83 Update permission icon for consistency 2016-05-28 10:03:27 +09:30
Toby Zerner
1629e7fbb4 Add separate tag permission for being able to add that tag to discussions
By default this is just the same as the "startDiscussion" permission, but flarum-ext-approval comes in and denies "addToDiscussion" specifically for tags where the user can't start discussions without approval.

ref flarum/core#904
2016-05-28 10:03:00 +09:30
Toby Zerner
01e776e2be Simplify discussion/tag permission logic
A user now must have a permission to act for *all* tags assigned to a discussion, rather than just one of them. This is consistent with the way the permissions are worked out for visibility.
2016-05-28 10:00:41 +09:30
Toby Zerner
e3278070ac Rename DiscussionWasTagged user property for consistency 2016-05-28 09:55:45 +09:30
Toby Zerner
63a4b34d6e Serialise tag IDs to integers rather than strings 2016-05-28 09:54:39 +09:30
Toby Zerner
823233b0da Generalise the potential for display of flags to all posts, rather than just comments
This is just more future-proofing, in case any other extensions introduce new post types which can be flagged.
2016-05-28 09:53:42 +09:30
Toby Zerner
d0c54cdbf9 Only allow OP to add tags that they can start discussions without approval in
closes flarum/core#904
2016-05-28 09:52:47 +09:30
Toby Zerner
badd03f3a3 Give the hidden/trash badge precedence over the awaiting approval badge
Given flarum/core@2d5a7ce, the hidden badge will no longer display for discussions awaiting approval – it will only display if the discussion has *actually* been marked as deleted by the OP. Thus, this information should have precedence. (There isn't much point in displaying both badges, I don't think.)
2016-05-28 09:50:45 +09:30
Toby Zerner
0bd3c16084 Generalise the potential for unapproved state to all posts, rather than just comments
This is just more future-proofing, in case any other extensions introduce new post types which can be queued for approval.
2016-05-28 09:48:17 +09:30
Toby Zerner
9f4e11097d Add actor information to the PostWasApproved event 2016-05-28 09:46:22 +09:30
Toby Zerner
ff6e674854 Give the is_approved attribute a default value on new Post models 2016-05-28 09:46:03 +09:30
Toby Zerner
5bc55e4538 Make Post component subclasses build on parent content
Extensions may wish to add attributes/content to all posts, regardless of type, by extending methods on the Post component. Now the subclasses will not overwrite, but rather append to, these additions.
2016-05-28 09:44:44 +09:30
Toby Zerner
971a1a5cdd Make discussion "hidden" state more explicit
Previously a discussion was classified on the front-end as "hidden" if it had zero posts. This was technically a correct statement as the discussion would not be visible to the public... but it also meant that a discussion with zero posts (like one awaiting approval) was impossible for the OP to delete/hide (i.e. indicate that they made a mistake and they don't want the discussion to be approved).
2016-05-28 09:43:21 +09:30
Toby Zerner
ed2257efb0 Remove space characters from in-between list items
They were causing some weirdness with spacing between redraws.
2016-05-28 09:38:58 +09:30
Toby Zerner
97b6b06280 Allow extensions to add default model attributes
Extensions can add default column values in their migrations, but Eloquent doesn't know about this when it first saves a model to the database.

This is useful in flarum-ext-approval where the default value for is_approved on the posts table is true.
2016-05-28 09:37:43 +09:30
Toby Zerner
fb939da898 Fix permission logic priorities
This helps to fix a bug in flarum-ext-tags where a user could not rename or edit the tags of their own discussion if it was in a restricted tag. This was due to the order of GetPermission event listeners – the logic that determines that a user *can't* perform an action because of a restrictive tag was running before (and thus instead of) the logic that determines that a user *can* edit their own stuff.

The solution is to change the "catch-all" methods on Policies to "after" instead of "before" – that is, they will run only if the per-ability methods return null.

We also simplify the GetPermission event by passing the model as a sole "argument", as I can't imagine any cases where we'll need more than one argument.
2016-05-28 09:35:08 +09:30
Toby Zerner
8ab991c299 Make sure deprecated ConfigureClientView event still works 2016-05-27 14:57:27 +09:30
Toby Zerner
e6b16234b6 Fix installer/updater 2016-05-27 14:53:22 +09:30