1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated shelf sort to allow default sort, added testing

Done during review of #2515
This commit is contained in:
Dan Brown
2021-03-21 23:06:15 +00:00
parent ab4c5a55b8
commit 5c9c1d1a4b
6 changed files with 70 additions and 11 deletions

View File

@ -343,7 +343,7 @@ class UserController extends Controller
$this->checkPermissionOrCurrentUser('users-manage', $userId);
$sort = $request->get('sort');
if (!in_array($sort, ['name', 'created_at', 'updated_at'])) {
if (!in_array($sort, ['name', 'created_at', 'updated_at', 'default'])) {
$sort = 'name';
}