mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Add deprecated "user" filter for posts
In the filterer refactor for ListPostsController, the filter key was changed to `author` for consistency with the AuthorFilterGambit used in discussions. This commit adds a deprecated `user` filter back in for a release to allow for a graceful transition
This commit is contained in:
@@ -46,6 +46,7 @@ class FilterServiceProvider extends AbstractServiceProvider
|
||||
PostFilter\IdFilter::class,
|
||||
PostFilter\NumberFilter::class,
|
||||
PostFilter\TypeFilter::class,
|
||||
PostFilter\UserFilter::class,
|
||||
],
|
||||
];
|
||||
});
|
||||
|
21
framework/core/src/Post/Filter/UserFilter.php
Normal file
21
framework/core/src/Post/Filter/UserFilter.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Post\Filter;
|
||||
|
||||
/**
|
||||
* @deprecated beta 16, remove beta 17. Use AuthorFilter instead.
|
||||
*/
|
||||
class UserFilter extends AuthorFilter
|
||||
{
|
||||
public function getFilterKey(): string
|
||||
{
|
||||
return 'user';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user