diff --git a/app/Http/Controllers/Accessories/AccessoriesFilesController.php b/app/Http/Controllers/Accessories/AccessoriesFilesController.php index 9ebdea9b83..ebc1e4b8e0 100644 --- a/app/Http/Controllers/Accessories/AccessoriesFilesController.php +++ b/app/Http/Controllers/Accessories/AccessoriesFilesController.php @@ -125,7 +125,7 @@ class AccessoriesFilesController extends Controller } } - // todo + return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.log_record_not_found')); } diff --git a/app/Http/Controllers/Assets/AssetFilesController.php b/app/Http/Controllers/Assets/AssetFilesController.php index b8ae3814da..d15055c4b2 100644 --- a/app/Http/Controllers/Assets/AssetFilesController.php +++ b/app/Http/Controllers/Assets/AssetFilesController.php @@ -80,10 +80,11 @@ class AssetFilesController extends Controller } - return redirect()->back()->with('error', trans('general.file_not_found_redirect')); - + return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found')); } + return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist')); + } /** diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index dda54f4c8d..50a758ac37 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -17,7 +17,6 @@ use App\Models\Location; use App\Models\Setting; use App\Models\Statuslabel; use App\Models\User; -use Illuminate\Support\Facades\Auth; use App\View\Label; use Carbon\Carbon; use Illuminate\Support\Facades\DB; diff --git a/app/Http/Controllers/Components/ComponentsFilesController.php b/app/Http/Controllers/Components/ComponentsFilesController.php index 4fa3366d32..83468a0b10 100644 --- a/app/Http/Controllers/Components/ComponentsFilesController.php +++ b/app/Http/Controllers/Components/ComponentsFilesController.php @@ -129,7 +129,7 @@ class ComponentsFilesController extends Controller return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.file_not_found')); } } - // todo + return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.log_record_not_found')); } diff --git a/app/Http/Controllers/Consumables/ConsumablesFilesController.php b/app/Http/Controllers/Consumables/ConsumablesFilesController.php index 6ada31f63f..054fdc0b81 100644 --- a/app/Http/Controllers/Consumables/ConsumablesFilesController.php +++ b/app/Http/Controllers/Consumables/ConsumablesFilesController.php @@ -124,7 +124,8 @@ class ConsumablesFilesController extends Controller return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.file_not_found')); } } - // todo + // The log record doesn't exist somehow + return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.log_record_not_found')); } diff --git a/app/Http/Controllers/Licenses/LicenseFilesController.php b/app/Http/Controllers/Licenses/LicenseFilesController.php index 662a696c49..6ab3cb7703 100644 --- a/app/Http/Controllers/Licenses/LicenseFilesController.php +++ b/app/Http/Controllers/Licenses/LicenseFilesController.php @@ -122,7 +122,8 @@ class LicenseFilesController extends Controller } } - // todo + // The log record doesn't exist somehow + return redirect()->route('licenses.show', ['licenses' => $license])->with('error', trans('general.log_record_not_found')); } diff --git a/app/Http/Controllers/Users/UserFilesController.php b/app/Http/Controllers/Users/UserFilesController.php index de3a37de32..e99bfe298f 100644 --- a/app/Http/Controllers/Users/UserFilesController.php +++ b/app/Http/Controllers/Users/UserFilesController.php @@ -132,7 +132,9 @@ class UserFilesController extends Controller } } - // todo + // The log record doesn't exist somehow + return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found')); + return redirect()->back()->with('error', trans('general.file_not_found')); } diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php index 34315c99a8..c2ca8bf4c7 100644 --- a/resources/lang/en-US/general.php +++ b/resources/lang/en-US/general.php @@ -434,6 +434,7 @@ return [ 'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail', 'placeholder_kit' => 'Select a kit', 'file_not_found' => 'File not found', + 'log_record_not_found' => 'No record for that log entry was found.', 'preview_not_available' => '(no preview)', 'setup' => 'Setup', 'pre_flight' => 'Pre-Flight',