]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/UserController.php
Apply column fix to all tables
[bookstack] / app / Http / Controllers / UserController.php
index d797552f12d9442d978c502c9402c8c4c371a768..ba35904378a6f2ca04a76baf26f78cc94b56388a 100644 (file)
@@ -300,7 +300,7 @@ class UserController extends Controller
      */
     public function changeSort(Request $request, string $id, string $type)
     {
-        $validSortTypes = ['books', 'bookshelves'];
+        $validSortTypes = ['books', 'bookshelves', 'shelf_books'];
         if (!in_array($type, $validSortTypes)) {
             return redirect()->back(500);
         }
@@ -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';
         }