Franz Liedke
092e5b9d23
flarum info: Tweak output styling
2018-09-04 00:32:54 +02:00
David Sevilla Martín
7e3980744e
InfoCommand improvements ( #1562 )
...
* Ignore error output of 'git rev-parse HEAD'
* Organize extension information in a table
2018-09-04 00:24:07 +02:00
Franz Liedke
85c965afbc
Use correct method from contract
2018-09-03 23:55:16 +02:00
David Sevilla Martín
43fc2c0952
Add 'oldUsername' to User\Event\Renamed ( #1563 )
2018-09-03 22:42:30 +02:00
Franz Liedke
5a9b47cdf7
Apply fixes from StyleCI ( #1561 )
...
[ci skip] [skip ci]
2018-09-01 23:35:37 +02:00
Franz Liedke
5374f8a352
flarum info: Display warning when in debug mode
...
Refs #1421 .
2018-09-01 16:57:44 +02:00
Franz Liedke
5f5af894ab
Load per-site extenders, if available
...
Closes #1559 .
2018-09-01 16:27:52 +02:00
Franz Liedke
d7c283a48f
Frontend extender: Work without extension, too
2018-09-01 16:15:02 +02:00
Toby Zerner
5142c639c1
Rename user methods
2018-08-24 22:13:06 +09:30
Toby Zerner
eb3232dfc9
Missed a spot
2018-08-24 22:13:06 +09:30
Toby Zerner
9792576464
Rename notification.sender
2018-08-24 22:13:06 +09:30
Toby Zerner
5c0c2d1c40
Rename notification.time
2018-08-24 22:13:05 +09:30
Toby Zerner
ce39bc9070
Rename user.newNotificationsCount
2018-08-24 22:13:05 +09:30
Toby Zerner
37ffd04b3f
Rename user.unreadNotificationsCount
2018-08-24 22:13:05 +09:30
Toby Zerner
d8d2de438f
Rename user.readTime
2018-08-24 22:13:05 +09:30
Toby Zerner
70058652b5
Rename user.isActivated
2018-08-24 22:13:05 +09:30
Toby Zerner
d9d8162684
Rename user.lastSeenTime
2018-08-24 22:13:05 +09:30
Toby Zerner
2ee10bb49f
Rename user.commentCount
2018-08-24 22:13:05 +09:30
Toby Zerner
64abbde8b2
Rename user.discussionsCount
2018-08-24 22:13:05 +09:30
Toby Zerner
ca93c8c609
Rename post.hideUser
2018-08-24 22:13:05 +09:30
Toby Zerner
8248ba2f7a
Rename post.editUser
2018-08-24 22:13:05 +09:30
Toby Zerner
dd65801d57
Rename post.hideTime
2018-08-24 22:13:05 +09:30
Toby Zerner
07c08ca798
Rename post.editTime
2018-08-24 22:13:05 +09:30
Toby Zerner
ae75f21b6b
Rename post.time
2018-08-24 22:13:05 +09:30
Toby Zerner
29cef23404
Rename discussion.hideUser
2018-08-24 22:13:05 +09:30
Toby Zerner
a7ffed6778
Rename discussion.readNumber
2018-08-24 22:13:05 +09:30
Toby Zerner
9074f7e592
Rename discussion.readTime
2018-08-24 22:13:05 +09:30
Toby Zerner
99e5013ac3
Rename discussion.hideTime
2018-08-24 22:13:05 +09:30
Toby Zerner
1e9d9b8322
Rename discussion.lastTime
2018-08-24 22:13:05 +09:30
Toby Zerner
568006fe73
Rename discussion.startTime
2018-08-24 22:13:05 +09:30
Toby Zerner
4756bf1daf
Rename discussion.lastPostedUser
2018-08-24 22:13:05 +09:30
Toby Zerner
8ecb67d49d
Rename discussion.startUser
2018-08-24 22:13:05 +09:30
Toby Zerner
e241518506
Rename discussion.startPost
2018-08-24 22:13:05 +09:30
Toby Zerner
cbd0643540
Rename discussion.participantsCount
2018-08-24 22:13:05 +09:30
Toby Zerner
7716944616
Rename discussion.commentsCount
2018-08-24 22:13:05 +09:30
Toby Zerner
e135b7830e
Fix installer
2018-08-24 22:12:45 +09:30
Toby Zerner
950ab30c29
Fix reset password
2018-08-24 21:54:46 +09:30
Toby Zerner
582054c61c
Merge branch 'master' into 1236-database-changes
2018-08-24 21:07:00 +09:30
Toby Zerner
280d51e678
Merge pull request #1555 from flarum/fl/sites
...
Rewrite sites / app
2018-08-24 18:21:05 +09:30
Toby Zerner
e9ed935ed1
Revert method name
2018-08-24 17:09:22 +09:30
Toby Zerner
809b161d71
Merge branch 'master' into 1236-database-changes
2018-08-24 17:03:50 +09:30
Franz Liedke
4c8908c005
Rename extension's bootstrap.php to extend.php
...
...while supporting the old name for a while.
Fixes #1556 .
Refs #1557 .
2018-08-24 00:08:56 +02:00
Franz Liedke
2d4dc02ca1
Pass container into apps, adapt path matching
2018-08-23 22:17:37 +02:00
Franz Liedke
869ec54bd0
Load middleware stacks lazily
...
This way, the forum middleware does not need to be loaded for
API requests, and vice-versa.
2018-08-22 09:20:47 +02:00
Franz Liedke
59b1ca9b7c
Implement request handler for maintenance mode
2018-08-22 09:20:00 +02:00
Franz Liedke
7439069fe2
Use more honest method names
2018-08-22 07:58:50 +02:00
Franz Liedke
973fbcf17b
Instantiate DispatchRoute manually
...
Since we are already providing the first and only argument
manually, we might as well instantiate the object manually.
Same effect, same coupling, less code.
2018-08-22 07:58:50 +02:00
Franz Liedke
fb5740926a
Split SessionServiceProvider from UserServiceProvider
...
This lets us register the former during installation, where the
latter is not yet registered.
That, in turn, means we can finally re-enable the StartSession
middleware in the installer app, which we need to log in the new
admin user when installation is complete.
2018-08-22 07:58:50 +02:00
Franz Liedke
32ad926cbc
One BusServiceProvider is enough
2018-08-22 07:58:50 +02:00
Franz Liedke
626d16de6f
Use zend-httphandlerrunner for marshalling requests and returning responses
...
Since Diactoros 1.8, the emitter and server classes have been
deprecated. They can be replaced by using this new package
directly.
2018-08-22 07:58:50 +02:00
Franz Liedke
0222692c53
Console Installer: Rely less on service providers
...
Most things we need, we can instantiate directly.
This means we have to do less tweaking in service providers that
are meant to provide services to a complete Flarum application
(that has already been installed properly), to make them work with
the uninstalled app.
The uninstalled app (the "installer") can now do only the
bootstrapping it needs to build a light-weight web and console
application, respectively.
2018-08-22 07:58:50 +02:00
Franz Liedke
b4b72fe62f
Get rid of some Application methods
...
These are not necessary to be available so broadly. In fact, they
seem to make it too easy to use them, which has lead to some sub-
optimal architecture decisions.
Their equivalents have been moved to the classes where used.
2018-08-22 07:58:50 +02:00
Franz Liedke
5b821b21b1
Split up Site into several classes
...
Depending on the state of the Flarum installation (installed, not
installed, currently upgrading, maintenance mode), we should enable
different sets of service providers.
For example, during installation we should not resolve a setting
repository from the container. This new architecture lets us do so,
but we can easily (and cleanly) register a different implementation
during installation.
This should prevent problems such as #1370 in the future.
2018-08-22 07:58:50 +02:00
Franz Liedke
7a6e208554
Split up HandleErrors middleware into distinct classes
...
These are completely distinct functionalities, toggled through the
system-wide debug flag. By moving the selection of the middleware
to use to the place where the middleware pipe is built, we make
the middleware itself be unaware of these flags. The two classes
are more focused on what they are doing, with the constructor
dependencies clearly representing their requirements.
In addition, this means we can just use the HandleErrorsWithWhoops
middleware in the installer, which means we do not need to worry
about how to inject a SettingsRepositoryInterface implementation
when flarum is not yet set up.
2018-08-22 07:58:50 +02:00
David Sevilla Martín
ca16a23383
Installer: add check for file existence & fix path resolving ( #1397 )
2018-08-19 23:40:37 +02:00
Toby Zerner
195f77ff10
Apply fixes from StyleCI ( #1551 )
...
[ci skip] [skip ci]
2018-08-18 12:13:40 +09:30
Toby Zerner
5f83285442
Add extension JS as a file to allow sourcemap detection
...
Fixes #1538
2018-08-18 12:13:17 +09:30
Franz Liedke
c16ddf24f2
Add tokenizer to PHP extension requirements
...
Refs flarum/flarum.github.io#73 .
2018-08-14 22:53:12 +02:00
Edward Betts
641079b3fe
Correct spelling mistakes. ( #1546 )
2018-08-14 21:46:53 +02:00
David Sevilla Martín
40e4c0acdd
Fix wrong permission in UserPolicy#find ( #1536 )
2018-08-13 06:45:56 +09:30
Charlie
ef9ed7f4fa
Dispatch the Deserializing event in Admin Content ( #1532 )
...
* Dispatch the Deserializing event
* Apply fixes from StyleCI (#1 )
2018-08-11 17:15:11 +09:30
Franz Liedke
24fd2f32c7
Service Provider: Move loadViewsFrom() to boot()
...
This method relies on the "view" being bound in the IoC container.
This is only guaranteed after all register() methods have run, thus
it should be done in boot().
2018-08-03 00:53:39 +02:00
Franz Liedke
cfc207f255
Apply fixes from StyleCI ( #1518 )
...
[ci skip] [skip ci]
2018-07-23 16:25:12 +02:00
Franz Liedke
d4a80eae5d
Replace Assets with Frontend extender
...
This extender allows registering both assets and simple GET routes
with frontend instances.
See #851 .
2018-07-23 16:24:00 +02:00
Toby Zerner
254d5d0c5b
Fix group/permission seeding
...
Updating the Migration::addPermission helper table name means we need
to move the seed migration to after the table rename migration. We also
add a sanity check for each permission's group since the foreign key
will fail if the group doesn't exist. Of course, the only way to make
sure groups are seeded before permissions is to move them into another
migration.
2018-07-21 23:02:44 +09:30
Toby Zerner
1709d4ef2c
Remove file accidentally added in merge
2018-07-21 22:09:14 +09:30
Toby Zerner
baeaa73597
Wrap column names; use whereColumn where possible
2018-07-21 22:02:54 +09:30
Toby Zerner
677a7dd2d3
Merge branch 'master' into 1236-database-changes
...
# Conflicts:
# src/Forum/Controller/IndexController.php
# src/User/UserMetadataUpdater.php
2018-07-21 21:37:49 +09:30
Toby Zerner
c562302161
Don't save in the model
2018-07-21 21:28:44 +09:30
Toby Zerner
d42f33971a
Fix user list sorting
2018-07-21 18:39:32 +09:30
Toby Zerner
aa4c4b07bd
Revert notifications_from table
...
I didn't think this change through and it's going to be too difficult
to implement right now. It can wait until we do the notifications
revamp. For now reverting back to the old structure, with the
`sender_id` column renamed to `from_user_id`.
2018-07-21 18:35:50 +09:30
Toby Zerner
420bb2efc8
Apply fixes from StyleCI
...
[ci skip] [skip ci]
2018-07-21 07:52:21 +00:00
Toby Zerner
ed57d6e51c
Clean up attribute assignment
2018-07-21 17:22:03 +09:30
Toby Zerner
b4f6c4be1f
Specify ambiguous column names
2018-07-21 17:21:37 +09:30
Toby Zerner
ff7f7681c7
Use Eloquent's latest
and oldest
2018-07-21 17:21:08 +09:30
Toby Zerner
7d0813bce4
Fix some incorrect attribute names
2018-07-21 17:20:43 +09:30
Toby Zerner
4f259425b0
Fix entity deletion
...
Foreign keys take care of most of this for us!
2018-07-21 17:18:40 +09:30
Toby Zerner
22fadb7f9c
Fix API key generation
2018-07-21 17:14:15 +09:30
Toby Zerner
6f3eb3f335
Fix discussion and post list sorting
2018-07-21 17:10:02 +09:30
Toby Zerner
2d667d885d
Fix email confirmation links
2018-07-21 17:08:11 +09:30
Toby Zerner
0fb81958cb
Clean up Eloquent definitions
2018-07-21 17:06:42 +09:30
Toby Zerner
87bba2186e
Fix to ensure we can rename columns in tables with enums
...
See https://github.com/laravel/framework/issues/1186
2018-07-21 15:26:12 +09:30
Toby Zerner
93b9513df2
Fix column names
2018-07-21 15:24:51 +09:30
Toby Zerner
fb6b2d05b1
Fix table name
2018-07-21 15:24:33 +09:30
Toby Zerner
fe73cf3237
Clean up migrations
...
* Make filenames and order more consistent
* Split foreign keys into their own migrations, add statements to ensure
data integrity prior to adding them
* Add renameColumns helper, use other helpers where possible
2018-07-21 15:23:37 +09:30
Daniel Klabbers
5a04635e7a
decided to leave the posts.discussion_id foreign key constraint to discussions out for now
2018-07-20 08:41:01 +02:00
Daniel Klabbers
b2e873ba7b
undo carbon change as proposed in review
2018-07-19 09:15:59 +02:00
David Sevilla Martín
d6414cfb44
Properly set comments_count and discussions_count ( #1436 )
2018-07-17 19:02:37 +02:00
Franz Liedke
85ceda0b0b
Remove another unused parameter
2018-07-16 15:48:48 +02:00
Franz Liedke
dc7c31e1c2
Remove incorrect attribute
2018-07-16 15:48:48 +02:00
Franz Liedke
177ac74596
Apply fixes from StyleCI ( #1508 )
...
[ci skip] [skip ci]
2018-07-16 15:13:21 +02:00
Franz Liedke
c76d9e1298
Move initial permission setup to migrations
...
Refs #1466 .
2018-07-16 15:12:46 +02:00
Franz Liedke
dee54a008f
Apply fixes from StyleCI ( #1507 )
...
[ci skip] [skip ci]
2018-07-16 01:44:50 +02:00
Franz Liedke
551ca23267
Discussion HTML: Add a canonical URL
...
Refs #358 and #1140 .
2018-07-16 01:43:06 +02:00
Franz Liedke
3d845d5730
Discussion HTML: Fix generation of next/prev URLs
2018-07-16 01:42:36 +02:00
Franz Liedke
9b03f8c71a
Make post filtering work with database prefixes
2018-07-16 01:22:13 +02:00
Franz Liedke
ce90d2bbdd
Installer: Get rid of an instance variable
...
Leftover from PR #1405 .
2018-07-16 00:33:32 +02:00
Franz Liedke
6e5b0f5289
Formatter: Tweak minifier setup
...
See discussion in PR #1457 .
2018-07-14 22:57:20 +02:00
Sajjad Hashemian
fba31995b1
Upgrade text formatter ( #1457 )
...
* upgrade TextFormatter
* remove finalize options
* cleanup JsCompiler
* simplify Formatter
* refactor Formatter cache
* minify formatter js
* remove Closure Compiler
2018-07-14 22:22:14 +02:00
AFR
034b82f4d4
Create new hidePosts permission ( #1466 )
2018-07-14 22:15:40 +02:00