Commit Graph

1422 Commits

Author SHA1 Message Date
Franz Liedke
f591585d02
Fix live output in ResetCommand
This was forgotten in 9e487b4.

Fixes #1663.
2018-11-29 22:04:01 +01:00
Franz Liedke
45afc33eb0
Fix code style and doc block 2018-11-29 21:31:12 +01:00
Daniël Klabbers
213fd62be3 Up the version (#1582) 2018-11-29 00:34:49 +01:00
Franz Liedke
66607a5674
Always invalidate all user email tokens
Reported by B. Dhiyaneshwaran of Geek Freak.
2018-11-29 00:33:42 +01:00
Toby Zerner
96e282458b Fix index names in migrations
This can be reverted when we upgrade to Laravel 5.7.
2018-11-27 12:19:13 +10:30
David Sevilla Martín
24ff8899a0
Throw FileNotFoundException when FileSource path does not exist
Closes #1649.
2018-11-22 23:40:38 +01:00
David Sevilla Martín
1b32c7cc51
Fix frontend extender using old container & wrong class 2018-11-22 21:17:32 +01:00
Franz Liedke
6c2a4a5ff7
Remove obsolete property accessor in User model
The locale field does not exist, and the accessor code was broken.

Closes #1653.
2018-11-22 21:12:25 +01:00
Toby Zerner
9115b9e28f Include LESS mixins and variables in all frontend compilers 2018-11-22 12:09:50 +10:30
Toby Zerner
3bff2e0f5c Consolidate ControllerRouteHandler into RouteHandlerFactory
Also allow closure to be passed for frontend content when creating routes
2018-11-22 12:09:50 +10:30
Toby Zerner
edaca3160e Refactor frontend code to allow for extension of assets
- Simpler class naming:
    Frontend\CompilerFactory → Frontend\Assets
    Frontend\HtmlDocumentFactory → Frontend\Frontend
    Frontend\HtmlDocument → Frontend\Document

- Remove AssetInterface and simply collect callbacks in Frontend\Assets
  instead

- Remove ContentInterface because it serves no purpose (never type-
  hinted or type-checked)

- Commit and add asset URLs to the Document via a content callback
  instead of in the Document factory class itself

- Add translations and locale assets to Assets separate to the assets
  factory, as non-forum/admin asset bundles probably won't want them

- Update Frontend Extender to allow the creation of new asset bundles

- Make custom LESS validation listener a standalone class instead of
  extending RecompileFrontendAssets
2018-11-22 12:09:50 +10:30
Toby Zerner
f3a5a89e12
Apply fixes from StyleCI (#1651)
[ci skip] [skip ci]
2018-11-22 08:04:41 +10:30
Toby Zerner
2ef66ac716 Add "clear cache" button to admin 2018-11-22 08:03:43 +10:30
Toby Zerner
6654894da1 Fix old session method name 2018-11-22 07:24:44 +10:30
Toby Zerner
53d1b87daf Revert "Configure external links before dispatching event"
This reverts commit 4c55d278b6.

Fixes #1650
2018-11-22 07:21:16 +10:30
Toby Zerner
c3b2d8e7d8 Typehint Frontend extender arguments 2018-11-16 15:19:51 +10:30
Toby Zerner
62a40036d0 Fix empty JS files not actually being empty 2018-11-16 15:17:57 +10:30
Toby Zerner
2c1be86857 Only say that we're migrating an extension if it has migrations 2018-11-14 16:41:36 +10:30
Toby Zerner
b26eb8e609 Publish core assets when migrating 2018-11-14 16:41:07 +10:30
Toby Zerner
1f0bf33cfb Fix extension names not being displayed when running migrations 2018-11-14 16:28:00 +10:30
Toby Zerner
7e95b80341 Drastically improve search performance
The previous approach of joining the posts table into the main search
query was not scaling well. Searches on discuss.flarum.org were taking
~1.5 seconds which – a significant improvement over the pre-beta 8
search, but still not acceptable.

This new approach uses a much more efficient subquery join. Searches
on discuss.flarum.org now take mere milliseconds. The search result
ranking strategy has been further refined as well so that discussions
are ranked by the collective relevance of their posts.
2018-11-14 11:19:39 +10:30
Toby Zerner
18b90d16e3 Allow users to hide their own posts just as they can edit them
This fixes a regression introduced by #1466.
2018-11-14 09:33:28 +10:30
Toby Zerner
3c8262ccde Fix incorrect regex modifier, causing JS to become malformed is some cases 2018-11-14 06:45:14 +10:30
Franz Liedke
68c6638fb5
Merge pull request #1633 from flarum/tz/improve-logging
Improve logging
2018-11-13 11:03:24 +01:00
Toby Zerner
105dd093fe Remove fileinfo dependency
As per https://github.com/flarum/docs/issues/14#issuecomment-365972062
2018-11-13 17:16:47 +10:30
Toby Zerner
920802e5ae Log errors when debug mode is on too 2018-11-13 07:47:01 +10:30
Clark Winkelmann
13c593cbaa Fix notification isRead value not being updated in API update response (#1635) 2018-11-12 00:14:13 +01:00
Toby Zerner
f7a320bcca Boot new application instance before enabling extensions. fixes #1587 (#1631) 2018-11-12 00:01:17 +01:00
Franz Liedke
b980c6fb7d
Remove unused default constructor 2018-11-11 23:52:47 +01:00
Toby Zerner
222e3c3fe2 Log errors that occur in the API stack
This takes place only in the FallbackExceptionHandler. Having a custom
exception handler implies that a friendly message is displayed in the
API response, in which case we can bet that the exception won't need to
be "debugged" per se.
2018-11-11 18:00:57 +10:30
Toby Zerner
903c1e329d Stop logging errors that use a custom view
Having a custom view implies that a friendly message is displayed to
the user, in which case we can bet that the exception won't need to be
"debugged" per se.
2018-11-11 17:57:55 +10:30
Toby Zerner
295a007cd5 Catch Throwables so that we handle internal PHP errors too 2018-11-11 17:54:19 +10:30
Toby Zerner
64e43ec9a4
Apply fixes from StyleCI (#1632)
[ci skip] [skip ci]
2018-11-11 17:01:34 +10:30
Toby Zerner
bf8bc0222f Delete associated notifications when deleting discussions, posts, and users. fixes #1380 2018-11-11 16:59:24 +10:30
Toby Zerner
6d14d0c39b Perform visibility checks on notification subjects at the query level
This will prevent a notification from being seen by a user if its
subject is deleted or undergoes some kind of permission change (eg.
a discussion is moved into a private tag)

ref #1380
2018-11-11 16:58:08 +10:30
Toby Zerner
17fdc0ebe0 Consolidate Post visibility logic into the PostPolicy
A post can only be seen if the discussion in which it resides can be
seen. The logic for this belongs in the policy, not the model.
2018-11-11 16:54:15 +10:30
Toby Zerner
b92ae61294 Always allow users to see their own account. fixes #1626 2018-11-11 14:25:21 +10:30
Franz Liedke
e99f7fcdac
Fix leak of private information when updating users
Fixes #1628.
2018-11-09 12:02:26 +01:00
Daniël Klabbers
bb0fc165af [b8] master token fix (#1622)
* fixed not being able to use master token because id column no longer holds key
* added flexibility of user_id column
* added tests to confirm the api keys actually work as intended
2018-11-07 22:34:09 +01:00
Daniël Klabbers
a09894a906
Update AccessToken.php
Fixes phpdoc while working on #1622
2018-11-01 10:56:45 +01:00
Daniël Klabbers
c446c5cc61 fixes author gambit when used with fulltext search, added test to cover (#1620)
* fixes author gambit when used with fulltext search, added test to cover

* Apply fixes from StyleCI

[ci skip] [skip ci]
2018-10-29 23:01:25 +01:00
Franz Liedke
a1948e7bb8
Fix installation in subdirectory
Fixes #1604.
2018-10-26 00:27:35 +02:00
Franz Liedke
2392e06c0e
Apply fixes from StyleCI (#1616)
[ci skip] [skip ci]
2018-10-24 22:20:15 +02:00
Franz Liedke
e3e10a8fc3
Allow setting all paths when instantiating Site
Fixes #1592.
2018-10-24 22:19:09 +02:00
Toby Zerner
0e3b0fc5a0 Update forgotten column name 2018-10-23 20:52:09 +10:30
Franz Liedke
4ed1d0aaee
New extender for adding variables to HtmlDocument payload
Fixes #1602.
2018-10-21 20:45:19 +02:00
Franz Liedke
86b26ce2fb
Tweak ContentInterface so that callables can be used as well 2018-10-21 20:41:45 +02:00
Daniël Klabbers
a03f243ca5 Fixes logging in with access token (#1605)
Seems the created_at column has no default value. This was always the case, at least that's what I can tell from a clean install and no migrations changing that default value.

```
$table->timestamp('created_at');
```
2018-10-21 01:21:34 +02:00
Toby Zerner
5f5e1c512c Load extensions in the configured order 2018-10-20 22:21:39 +10:30
Toby Zerner
a4d540f74b Don't require paths to be set in config - use sensible defaults 2018-10-18 19:27:03 +10:30