1
0
mirror of https://github.com/flarum/core.git synced 2025-08-26 17:45:01 +02:00
Commit Graph

8723 Commits

Author SHA1 Message Date
David Sevillas Martin
554927f9b9 Remove unneeded JS imports 2019-08-19 18:59:57 -04:00
David Sevillas Martin
da300e5a77 Update JS dependencies 2019-08-19 18:59:47 -04:00
David Sevillas Martin
8a3662c460 Update extension icon to FA 5 2019-08-19 18:59:33 -04:00
Franz Liedke
8a74becdff Remove obsolete queue config 2019-08-19 22:33:32 +02:00
Daniël Klabbers
c5f5d47d31 Queue support (#1773)
Implementation of clean queue handling, by default sync is used
2019-08-19 21:44:06 +02:00
Shivanshu Patel
7afdbb1ea9 Remove like with and compare with equals (#37)
`_` is special character in mysql so like query was fetching different result for user who's unsername starts with or contains `_`
2019-08-16 15:57:35 +02:00
Franz Liedke
bccd493967 Don't fail when extend.php doesn't return an array
Refs #1607.
2019-08-16 12:29:31 +02:00
Franz Liedke
3feca515c3 #1607: Show more details when catching boot errors 2019-08-16 12:13:47 +02:00
Franz Liedke
430ddefb42 Bubble up exception for invalid confirmation token
This way, the error handler can simply be amended to deal with this
exception type with a dedicated error message or page.

Refs #1337.
Closes #1528.
2019-08-14 19:47:56 +02:00
Franz Liedke
919ebfcc33 Determine error view and message based on type
...not based on status code.

To simplify this logic, we now use the same error "type" both when
routes are not found and specific models are not found. One exception is
ours, one is from Laravel, but for the purposes of error handling they
should be treated the same.

Fixes flarum/core#1641.
2019-08-14 19:47:56 +02:00
Franz Liedke
405cd8764e Add error message for invalid confirmation tokens
Fixes flarum/core#1337.
2019-08-14 19:39:52 +02:00
Franz Liedke
f020719a84 Update error keys to match based on exception type
...instead of status code. There are (or will be) multiple different
keys for similar errors with the same status code. In the future, we
will use the error's "type" (see flarum/core#1843) to distinguish them.

Refs flarum/core#1641.
2019-08-14 19:38:54 +02:00
Franz Liedke
a8bd284c1a Remove obsolete translation for maintenance mode
We currently don't have a pretty error page for maintenance mode.
2019-08-14 18:09:51 +02:00
flarum-bot
40a8068dea Bundled output for commit 4cd48ac048 [skip ci] 2019-08-14 06:41:45 +00:00
Franz Liedke
03f4305497 Add translations for user deletion status
Replaces #142.
Refs flarum/core#1750, flarum/core#1788.
2019-08-14 08:35:25 +02:00
Franz Liedke
4cd48ac048 Tweak translation keys, always use full keys
Makes them easier to grep when editing / removing.

Refs #1750, #1788.
2019-08-14 08:34:36 +02:00
Franz Liedke
e7cdd497dd Extract real method
Refs #1750, #1788.
2019-08-14 08:34:14 +02:00
flarum-bot
c3740281b6 Bundled output for commit be6d42d46f [skip ci] 2019-08-13 21:02:10 +00:00
Tobias Karlsson
be6d42d46f Improve feedback on user deletion
Fixes #1750, #1777
2019-08-13 22:56:24 +02:00
Franz Liedke
fcb3921a42 Merge pull request #1843 from flarum/fl/1641-exception-handling
Implement new error handling stack
2019-08-13 22:45:46 +02:00
David Sevilla Martin
8277b54651 Add image button (flarum/core#1679) 2019-08-11 16:06:30 -04:00
Franz Liedke
01c77b8e2a Support multiple error reporters
The error handling middleware now expects an array of reporters.
Extensions can register new reporters in the container like this:

    use Flarum\Foundation\ErrorHandling\Reporter;

    $container->tag(NewReporter::class, Reporter::class);

Note that this is just an implementation detail and will be hidden
behind an extender.
2019-08-10 11:04:12 +02:00
Franz Liedke
f73a39d3f4 Remove old error handler, middleware and tests 2019-08-10 00:26:24 +02:00
Franz Liedke
8e0cd27f54 API Client: Use new error handling mechanism 2019-08-10 00:26:24 +02:00
Franz Liedke
410028dae6 Use new error handler middleware 2019-08-10 00:26:24 +02:00
Franz Liedke
817e54abe0 Wire up new error handling stack 2019-08-10 00:26:23 +02:00
Franz Liedke
13377100fb Make existing extensions compatible with new stack 2019-08-10 00:26:22 +02:00
Franz Liedke
11e76b1965 Implement new error handling stack
This separates the error registry (mapping exception types to status
codes) from actual handling (the middleware) as well as error formatting
(Whoops, pretty error pages or JSON-API?) and reporting (log? Sentry?).

The components can be reused in different places (e.g. the API client
and the error handler middleware both need the registry to understand
all the exceptions Flarum knows how to handle), while still allowing to
change only the parts that need to change (the API stack always uses the
JSON-API formatter, and the forum stack switches between Whoops and
pretty error pages based on debug mode).

Finally, this paves the way for some planned features and extensibility:
- A console error handler can build on top of the registry.
- Extensions can register new exceptions and how to handle them.
- Extensions can change how we report exceptions (e.g. Sentry).
- We can build more pretty error pages, even different ones for
  exceptions having the same status code.
2019-08-10 00:26:22 +02:00
Franz Liedke
dbbfb01e3a Remove obsolete constructor parameter
This was removed in commit 7b2807a8.
2019-08-10 00:16:21 +02:00
flarum-bot
e79d1b8f6b Bundled output for commit 1702929079 [skip ci] 2019-08-08 23:12:56 +00:00
Franz Liedke
1702929079 a11y: Try to make screenreaders read tooltips
Refs #1835.
2019-08-08 22:40:30 +02:00
David Sevilla Martín
b3019e72fe Add canonical URL to discussion list (#1814) 2019-08-08 00:01:25 +02:00
David Sevilla Martin
eb561e6343 Fix 'polyfills' incorrect spelling, add LICENSE text for startsWith polyfill 2019-08-03 09:14:24 -04:00
flarum-bot
68dcc83582 Bundled output for commit 5fe1de86dc [skip ci] 2019-08-01 21:18:40 +00:00
David Sevilla Martín
5fe1de86dc Update to Twemoji 12 and switch to 'simple-emoji-map' (#20) 2019-08-01 23:17:25 +02:00
Franz Liedke
2fc2cd5863 Bypass CSRF token check when using access tokens
Fixes #1828.
2019-08-01 22:53:31 +02:00
Franz Liedke
51b33c8cab Make exception message dynamic as well 2019-08-01 22:25:28 +02:00
Daniël Klabbers
a46c9b0c1d Merge branch 'master' of github.com:flarum/core 2019-07-31 17:10:47 +02:00
Daniël Klabbers
9209a5f588 Allows configuration of where the language files live. So that
language packs can optionally decide for themselves if they want
to use a different directory.
2019-07-31 17:10:13 +02:00
Franz Liedke
1169e4aca6 Determine default route after extensions
Fixes #1819.
2019-07-30 00:56:29 +02:00
Franz Liedke
b59aef7838 PHPUnit: Get rid of deprecated annotation
Refs #1795.
2019-07-30 00:09:10 +02:00
Daniël Klabbers
720c88e73a fixes #1695, take into consideration is_private with counts on User stats 2019-07-28 20:59:12 +02:00
Daniël Klabbers
6745f55ad7 fixed ci, make green again; mysql service wasnt booted 2019-07-27 22:24:39 +02:00
Franz Liedke
7ca47b67c3 Prevent MySQL search operators from taking effect
We do not want to inherit MySQL's fulltext query language, so let's
just drop all non-word characters from the search term.

Fixes #1498.
2019-07-23 23:55:06 +02:00
Franz Liedke
10ba2e9464 Revert "Remove deprecated bootstrap.php fallback"
This reverts commit 4abd6d61a9.

We will keep this fallback in place, to avoid unnecessary breakage of
backwards compatibility for extension authors.

Removal is planned for the final 0.1 release.
2019-07-14 22:22:06 +02:00
Franz Liedke
928b360135 Clean up database query
- Use existing `selectRaw()` method to avoid using the global `app()`
  helper as a service locator, which hides dependencies.
- Do the same for the join.
- The `Expression` is necessary to prevent the aliased column from being
  prefixed with the database table prefix, if configured.
2019-07-11 22:35:19 +02:00
dependabot[bot]
2697397376 Bump lodash-es from 4.17.11 to 4.17.14 in /js (#1818)
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-11 09:21:17 +02:00
David Sevilla Martín
f4e250f514 Simplify some code in MarkdownButton component 2019-07-10 12:41:05 -04:00
David Sevilla Martín
50a4530cfc Use custom JSX implementation of GitHub's markdown toolbar that works in IE 11 2019-07-10 12:30:35 -04:00
Daniël Klabbers
ffb7495266 fixed class property hint for event post content attribute 2019-07-09 08:31:48 +02:00