1
0
mirror of https://github.com/flarum/core.git synced 2025-08-10 18:35:56 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Ian Morland
07ebe5b57d [chore] update deprecated event comments (#41) 2022-02-22 14:07:04 -05:00
Alexander Skvortsov
e3f051bf4b fix: return user when creating flags (#42)
Fixes https://github.com/flarum/QualityAssurance/issues/41

When the API response is ingested by `pushObject`, since the flag instance is new, there is nothing to merge with, and therefore, there's no user on the flag instance in the store. As a result, the flag is displayed with "deleted" as the creating user until a page refresh occurs.

More broadly, this could be fixed by either:
- Refactoring the JSON API layer so that all singular operations return the same set of includes.
- Merging the API Paylod with sent data on model save (for new instances only).
But the former would require a major breaking rewrite, and the latter could introduce potentially unwanted side effects, and is effectively a bandaid over inconsistent backend behavior.
2022-01-13 16:39:00 -05:00
Alexander Skvortsov
99a82d0069 Apply fixes from StyleCI 2021-05-12 00:08:36 +00:00
Alexander Skvortsov
be59e77a01 Move in visibility scoping from tags, add automated testing. 2021-05-11 20:04:52 -04:00
Alexander Skvortsov
f80a88d45b Use RequestUtil for accessing actor 2021-04-08 00:02:11 -04:00
Alexander Skvortsov
9936681634 Use Symfony translator contract instead of deprecated component 2021-04-08 00:00:49 -04:00
Sami Mazouz
d5149b7406 Eager load post.user.groups relation and allow extensions to eager load relations (#38)
* Allow extensions to eager load relations
* Eager load post.user.groups
2021-04-07 16:24:52 +01:00
Ian Morland
705ea7f2bc Add Created and Deleting events (#35) 2021-01-25 08:49:27 -05:00
Sami Mazouz
c6e14394fd Use new extenders (#34) 2020-12-08 11:43:56 -05:00
Matthew Kilgore
e9022d5710 Replace depreciated helpers with class variant 2020-07-25 18:41:01 -04:00
Matt Kilgore
e85063fbf7 Remove AssertPermissionTrait (#26)
* Remove AssertPermissionTrait

* Apply fixes from StyleCI

* Fix my dumb mistake

* Fix another small mistake ->assertRegistered

Co-authored-by: luceos <daniel+github@klabbers.email>
2020-07-20 08:02:29 +02:00
Franz Liedke
cf764d2c00 Use new Model extender 2020-04-24 15:55:19 +02:00
Franz Liedke
beb5329e42 Fix flagging check for all post types
Refs #18.
2020-02-07 11:57:20 +01:00
Franz Liedke
e9a11b11d3 Tweak translation keys for consistency
Refs #18.
2020-02-07 11:54:29 +01:00
Ian Morland
4344f71d99 Flag improvements/tweaks (#18)
* Option to allow users to flag their own post
* Increase size of "Flag Post" modal
* Allow optional reason detail for offtopic, inappropriate and spam reasons
* For other reasons, detail text is now required
* Switch to column type "text" to allow more details in reason
2020-02-07 11:23:10 +01:00
Franz Liedke
e64ca03985 Apply fixes from StyleCI 2019-11-29 23:02:02 +00:00
David Sevilla Martin
da37c9a0a5 Assert registered in /api/flags to fix issue with guests 2019-10-29 18:05:49 -04:00
lubo
8ec05c4905 bugfix when posts is not needed when showing discussion (#17)
When accessing /api/discussion/[id]?include=user, NOTICE occurs
2019-03-25 11:04:30 +01:00
Franz Liedke
8aab6111ec Get rid of event subscribers that resolve services too early
Refs flarum/core#1578.
2018-12-15 16:47:41 +01:00
Toby Zerner
ec60fed381 Database changes (#15)
* Implement database changes

* Split foreign keys into their own migration

* Use whereColumn

* Rename flag.time

* Rename forum.flagCount

* Rename forum.newFlagCount
2018-09-16 20:49:41 +02:00
Franz Liedke
5087ba4148 Remove unused imports 2018-02-08 18:26:43 +01:00
Franz Liedke
c797732e60 Use Routes extender 2018-02-08 18:21:29 +01:00
Franz Liedke
95f70cae7a Adapt new bootstrap format, use Asset extender 2018-01-16 23:18:17 +01:00
Toby Zerner
d14b20ca74 Change fire → dispatch
See a6c5128b46
2018-01-11 12:44:22 +10:30
Toby Zerner
53b793845a Fix class name 2017-12-27 16:09:35 +10:30
Franz Liedke
bd635b55f7 Fix class names 2017-10-03 19:45:26 +02:00
Franz Liedke
494f953ace Update namespaces for beta 8
Refs flarum/core#1235.
2017-10-01 19:56:38 +02:00
Toby Zerner
1a85493f19 Apply fixes from StyleCI
[ci skip] [skip ci]
2016-11-29 05:29:39 +00:00
Toby Zerner
b6545a5f8e Use new event name 2016-06-03 11:01:31 +09:30
Toby Zerner
bc1d5f9a7a Applied fixes from StyleCI 2016-02-25 22:51:10 -05:00
Franz Liedke
301ff7e8b2 Expose creation time in flag serializer
Fixes flarum/core#651.
2016-01-20 21:06:37 +01:00
Toby Zerner
379b1f0831 Expand reason descriptions and add configurable link to community guidelines 2015-11-04 12:59:29 +10:30
Toby Zerner
8d50251ec5 Make sure we don't accidentally load all of a discussion's posts 2015-11-02 22:17:21 +10:30
Toby Zerner
5be607a6a7 Translations are now automatically included 2015-11-02 18:52:17 +10:30
Toby Zerner
c39f4f01ea Fix flag count queries 2015-10-31 14:49:44 +10:30
Toby Zerner
0ec3b0aabb Update serializer API 2015-10-30 22:45:26 +10:30
Toby Zerner
50645c5db9 Update API relationship listener 2015-10-30 11:06:50 +10:30
Toby Zerner
e357d2b535 Add third state to flags header icon
closes flarum/core#500
2015-10-19 16:20:00 +10:30
Toby Zerner
8a1c5cf24c Don't set flags relationship on non-hydrated posts 2015-10-14 12:26:13 +10:30
Toby Zerner
5f9d45c4ab Update for composer branch 2015-10-11 18:51:25 +10:30
Toby Zerner
a1e01938ef Rename to Flags, tweak flag controls
- Display post "destructiveControls" in flag instead of custom buttons
- Make flags more versatile/extensible
- Delete associated flags when a post is deleted

Uninstall the Reports extension before installing.
2015-09-22 18:14:33 +09:30
Toby Zerner
cb6347ef6a Initial commit 2015-09-04 13:26:51 +09:30