]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/MaintenanceController.php
Started work on details/summary blocks
[bookstack] / app / Http / Controllers / MaintenanceController.php
index a638b69cd6d9dfa8d8a180f0d626f72819d345f5..f13266d7c6150c77b255f49e7f9131ea8ceb98a1 100644 (file)
@@ -3,7 +3,7 @@
 namespace BookStack\Http\Controllers;
 
 use BookStack\Actions\ActivityType;
-use BookStack\Entities\Managers\TrashCan;
+use BookStack\Entities\Tools\TrashCan;
 use BookStack\Notifications\TestEmail;
 use BookStack\Uploads\ImageService;
 use Illuminate\Http\Request;
@@ -25,7 +25,7 @@ class MaintenanceController extends Controller
         $recycleStats = (new TrashCan())->getTrashedCounts();
 
         return view('settings.maintenance', [
-            'version' => $version,
+            'version'      => $version,
             'recycleStats' => $recycleStats,
         ]);
     }
@@ -45,6 +45,7 @@ class MaintenanceController extends Controller
         $deleteCount = count($imagesToDelete);
         if ($deleteCount === 0) {
             $this->showWarningNotification(trans('settings.maint_image_cleanup_nothing_found'));
+
             return redirect('/settings/maintenance')->withInput();
         }
 
@@ -66,7 +67,7 @@ class MaintenanceController extends Controller
         $this->logActivity(ActivityType::MAINTENANCE_ACTION_RUN, 'send-test-email');
 
         try {
-            user()->notify(new TestEmail());
+            user()->notifyNow(new TestEmail());
             $this->showSuccessNotification(trans('settings.maint_send_test_email_success', ['address' => user()->email]));
         } catch (\Exception $exception) {
             $errorMessage = trans('errors.maintenance_test_email_failure') . "\n" . $exception->getMessage();