]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Controllers/RecycleBinController.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / app / Entities / Controllers / RecycleBinController.php
index 78f86a5ae5076df7c5cea7320b2c25fc657a121b..d11dde4dd73b19d39bb756076ef4d2c511ba26c5 100644 (file)
@@ -116,9 +116,9 @@ class RecycleBinController extends Controller
      *
      * @throws \Exception
      */
-    public function empty()
+    public function empty(TrashCan $trash)
     {
-        $deleteCount = (new TrashCan())->empty();
+        $deleteCount = $trash->empty();
 
         $this->logActivity(ActivityType::RECYCLE_BIN_EMPTY);
         $this->showSuccessNotification(trans('settings.recycle_bin_destroy_notification', ['count' => $deleteCount]));