From 1312808d75f629d8244a5779582d399abdd1c914 Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Sat, 15 Apr 2017 10:59:18 +0100 Subject: [PATCH] #3: Fixed issues where the album list didn't always show in the menu - and when it did, it was only applicable to anonymous users --- app/Http/Kernel.php | 4 ++-- app/Http/Middleware/GlobalConfiguration.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7e7fed3..e4e4a92 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -18,8 +18,7 @@ class Kernel extends HttpKernel */ protected $middleware = [ \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, - AppInstallation::class, - GlobalConfiguration::class + AppInstallation::class ]; /** @@ -35,6 +34,7 @@ class Kernel extends HttpKernel \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, + GlobalConfiguration::class ], 'api' => [ diff --git a/app/Http/Middleware/GlobalConfiguration.php b/app/Http/Middleware/GlobalConfiguration.php index 9c0b1b7..32c7884 100644 --- a/app/Http/Middleware/GlobalConfiguration.php +++ b/app/Http/Middleware/GlobalConfiguration.php @@ -59,8 +59,7 @@ class GlobalConfiguration private function addAlbumsToView() { - //$albums = DbHelper::getAlbumsForCurrentUser_NonPaged()->get(); - $albums = Album::all(); + $albums = DbHelper::getAlbumsForCurrentUser_NonPaged()->get(); View::share('albums', $albums); }