From 9539e1beef4913f39be52db2007de5a7afc3820b Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 23 May 2018 12:45:00 +0200 Subject: [PATCH] Don't use pagination for groups list page --- Changelog | 1 + app/Http/Controllers/BrowseGroupController.php | 2 +- app/Models/Group.php | 10 ++++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index e38bef965..f30de448b 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-05-23 DariusIII + * Chg: Don't use pagination for groups list page * Fix: Fix Admin/AnidbController edit function * Fix: Fix anidb-edit link * Fix: Fix typo that lead to bad anidb rss feed diff --git a/app/Http/Controllers/BrowseGroupController.php b/app/Http/Controllers/BrowseGroupController.php index f5a29ee71..3b85701bd 100644 --- a/app/Http/Controllers/BrowseGroupController.php +++ b/app/Http/Controllers/BrowseGroupController.php @@ -12,7 +12,7 @@ class BrowseGroupController extends BasePageController public function show() { $this->setPrefs(); - $groupList = Group::getGroupsRange(false, false, '', true); + $groupList = Group::getGroupsRange( '', true); $this->smarty->assign('results', $groupList); $meta_title = 'Browse Groups'; diff --git a/app/Models/Group.php b/app/Models/Group.php index eb66f7fde..00f38a0f5 100644 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -231,12 +231,10 @@ class Group extends Model } /** - * Gets all groups. - * - * * @param string $groupname - * @param null $active - * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator + * @param null $active + * + * @return \Illuminate\Database\Eloquent\Builder[]|\Illuminate\Database\Eloquent\Collection */ public static function getGroupsRange($groupname = '', $active = null) { @@ -252,7 +250,7 @@ class Group extends Model $groups->where('active', '=', 0); } - return $groups->paginate(config('nntmux.items_per_page')); + return $groups->get(); } /**