X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/483cb41665c9d5994b47c762670d5fd98188cf14..refs/pull/2700/head:/app/Http/Controllers/RecycleBinController.php diff --git a/app/Http/Controllers/RecycleBinController.php b/app/Http/Controllers/RecycleBinController.php index 459dbb39d..a644a2889 100644 --- a/app/Http/Controllers/RecycleBinController.php +++ b/app/Http/Controllers/RecycleBinController.php @@ -1,7 +1,8 @@ checkPermission('restrictions-manage-all'); return $next($request); }); - parent::__construct(); } @@ -30,6 +30,7 @@ class RecycleBinController extends Controller { $deletions = Deletion::query()->with(['deletable', 'deleter'])->paginate(10); + $this->setPageTitle(trans('settings.recycle_bin')); return view('settings.recycle-bin.index', [ 'deletions' => $deletions, ]); @@ -56,6 +57,7 @@ class RecycleBinController extends Controller { /** @var Deletion $deletion */ $deletion = Deletion::query()->findOrFail($id); + $this->logActivity(ActivityType::RECYCLE_BIN_RESTORE, $deletion); $restoreCount = (new TrashCan())->restoreFromDeletion($deletion); $this->showSuccessNotification(trans('settings.recycle_bin_restore_notification', ['count' => $restoreCount])); @@ -83,6 +85,7 @@ class RecycleBinController extends Controller { /** @var Deletion $deletion */ $deletion = Deletion::query()->findOrFail($id); + $this->logActivity(ActivityType::RECYCLE_BIN_DESTROY, $deletion); $deleteCount = (new TrashCan())->destroyFromDeletion($deletion); $this->showSuccessNotification(trans('settings.recycle_bin_destroy_notification', ['count' => $deleteCount])); @@ -97,6 +100,7 @@ class RecycleBinController extends Controller { $deleteCount = (new TrashCan())->empty(); + $this->logActivity(ActivityType::RECYCLE_BIN_EMPTY); $this->showSuccessNotification(trans('settings.recycle_bin_destroy_notification', ['count' => $deleteCount])); return redirect($this->recycleBinBaseUrl); }