From 305ef0f5a3cb2f745c83543fa0073ddcc83f55a1 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 3 Jul 2025 09:21:03 +0800 Subject: [PATCH] Minor code consistency changes, no functional changes --- app/Http/Controllers/HomeController.php | 8 ++++---- resources/views/components/success.blade.php | 10 ++-------- resources/views/frames/dn.blade.php | 3 ++- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 47fa84b9..7b00f529 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -206,7 +206,7 @@ class HomeController extends Controller } return Redirect::to('/') - ->with('success',[sprintf('%s: %s',__('Deleted'),$dn)]); + ->with('success',sprintf('%s: %s',__('Deleted'),$dn)); } public function entry_export(Request $request,string $id): \Illuminate\View\View @@ -298,7 +298,7 @@ class HomeController extends Controller $request->get('_userpassword_hash')); if (! $o->getDirty()) - return back() + return Redirect::back() ->withInput() ->with('note',__('No attributes changed')); @@ -315,7 +315,7 @@ class HomeController extends Controller $o = config('server')->fetch($from_dn); if (! $o) - return back() + return Redirect::back() ->withInput() ->with('note',__('DN doesnt exist')); @@ -351,7 +351,7 @@ class HomeController extends Controller $o->{$key} = array_filter($value); if (! $dirty=$o->getDirty()) - return back() + return Redirect::back() ->withInput() ->with('note',__('No attributes changed')); diff --git a/resources/views/components/success.blade.php b/resources/views/components/success.blade.php index 2cefc7a1..fe52025b 100644 --- a/resources/views/components/success.blade.php +++ b/resources/views/components/success.blade.php @@ -1,11 +1,5 @@ @if(session()->has('success')) -
-

Success!

-
- +
+

{{ session()->pull('success') }}

@endif \ No newline at end of file diff --git a/resources/views/frames/dn.blade.php b/resources/views/frames/dn.blade.php index 1b878d62..0cd0e5e8 100644 --- a/resources/views/frames/dn.blade.php +++ b/resources/views/frames/dn.blade.php @@ -51,9 +51,10 @@
@endif + + - @endsection