]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/RecycleBinController.php
Added front-end toggle and testing of inline attachments
[bookstack] / app / Http / Controllers / RecycleBinController.php
index 57038046ad397c870805d2356f888d71141ef19c..a644a2889ca28f1b0b2d648798050a27963696ae 100644 (file)
@@ -1,8 +1,8 @@
 <?php namespace BookStack\Http\Controllers;
 
 use BookStack\Actions\ActivityType;
-use BookStack\Entities\Deletion;
-use BookStack\Entities\Managers\TrashCan;
+use BookStack\Entities\Models\Deletion;
+use BookStack\Entities\Tools\TrashCan;
 
 class RecycleBinController extends Controller
 {
@@ -20,7 +20,6 @@ class RecycleBinController extends Controller
             $this->checkPermission('restrictions-manage-all');
             return $next($request);
         });
-        parent::__construct();
     }
 
 
@@ -31,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,
         ]);
@@ -85,9 +85,9 @@ 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->logActivity(ActivityType::RECYCLE_BIN_DESTROY, $deletion);
         $this->showSuccessNotification(trans('settings.recycle_bin_destroy_notification', ['count' => $deleteCount]));
         return redirect($this->recycleBinBaseUrl);
     }