From a3f7091785e1592cef1acc23448d29133cbcbcbe Mon Sep 17 00:00:00 2001 From: Shift Date: Thu, 31 Oct 2024 20:46:52 +0000 Subject: [PATCH] Shift to consistent, fluent response chains --- Blacklight/utility/Utility.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Blacklight/utility/Utility.php b/Blacklight/utility/Utility.php index 8cf02b8e2..51f87a11b 100755 --- a/Blacklight/utility/Utility.php +++ b/Blacklight/utility/Utility.php @@ -244,7 +244,7 @@ class Utility "\n". '\n"; - return response($response)->header('Content-type', 'text/xml')->header('Content-Length', strlen($response))->header('X-NNTmux', 'API ERROR ['.$errorCode.'] '.$errorText)->header('HTTP/1.1', $errorHeader); + return response($response)->header('Content-type', 'text/xml')->header('Content-Length', strlen())->header('X-NNTmux', 'API ERROR ['.$errorCode.'] '.$errorText)->header('HTTP/1.1', $errorHeader); } public static function getRange($tableName): LengthAwarePaginator diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a65a3c1e2..1a8d6a2a9 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -65,7 +65,7 @@ class LoginController extends Controller $this->fireLockoutEvent($request); $request->session()->flash('message', 'You have failed to login too many times.Try again in '.$this->decayMinutes().' minutes.'); - return redirect('login'); + return redirect()->to('login'); } if ($validator->passes()) { @@ -76,7 +76,7 @@ class LoginController extends Controller if (! $user->isVerified() || $user->isPendingVerification()) { $request->session()->flash('message', 'You have not verified your email address!'); - return redirect('login'); + return redirect()->to('login'); } if (Auth::attempt($request->only($login_type, 'password'), $rememberMe)) { @@ -96,13 +96,13 @@ class LoginController extends Controller $request->session()->flash('message', 'Username or email used do not match our records!'); } - return redirect('login'); + return redirect()->to('login'); } $this->incrementLoginAttempts($request); $request->session()->flash('message', implode('', Arr::collapse($validator->errors()->toArray()))); - return redirect('login'); + return redirect()->to('login'); } public function showLoginForm()