X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3b31ac75ec41b3990cea770a9e48e2066bd8e9a3..refs/pull/5313/head:/app/Settings/MaintenanceController.php diff --git a/app/Settings/MaintenanceController.php b/app/Settings/MaintenanceController.php index 9c48a4323..0382ae08a 100644 --- a/app/Settings/MaintenanceController.php +++ b/app/Settings/MaintenanceController.php @@ -5,7 +5,6 @@ namespace BookStack\Settings; use BookStack\Activity\ActivityType; use BookStack\Entities\Tools\TrashCan; use BookStack\Http\Controller; -use BookStack\Notifications\TestEmail; use BookStack\References\ReferenceStore; use BookStack\Uploads\ImageService; use Illuminate\Http\Request; @@ -15,7 +14,7 @@ class MaintenanceController extends Controller /** * Show the page for application maintenance. */ - public function index() + public function index(TrashCan $trashCan) { $this->checkPermission('settings-manage'); $this->setPageTitle(trans('settings.maint')); @@ -24,7 +23,7 @@ class MaintenanceController extends Controller $version = trim(file_get_contents(base_path('version'))); // Recycle bin details - $recycleStats = (new TrashCan())->getTrashedCounts(); + $recycleStats = $trashCan->getTrashedCounts(); return view('settings.maintenance', [ 'version' => $version, @@ -69,7 +68,7 @@ class MaintenanceController extends Controller $this->logActivity(ActivityType::MAINTENANCE_ACTION_RUN, 'send-test-email'); try { - user()->notifyNow(new TestEmail()); + user()->notifyNow(new TestEmailNotification()); $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(); @@ -88,7 +87,7 @@ class MaintenanceController extends Controller $this->logActivity(ActivityType::MAINTENANCE_ACTION_RUN, 'regenerate-references'); try { - $referenceStore->updateForAllPages(); + $referenceStore->updateForAll(); $this->showSuccessNotification(trans('settings.maint_regen_references_success')); } catch (\Exception $exception) { $this->showErrorNotification($exception->getMessage());