X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/529f7bd1bc21dffa8ba29295f86e050e0c30645b..refs/pull/5721/head:/app/Settings/MaintenanceController.php diff --git a/app/Settings/MaintenanceController.php b/app/Settings/MaintenanceController.php index 62eeecf39..ac9dd20cc 100644 --- a/app/Settings/MaintenanceController.php +++ b/app/Settings/MaintenanceController.php @@ -3,6 +3,7 @@ namespace BookStack\Settings; use BookStack\Activity\ActivityType; +use BookStack\App\AppVersion; use BookStack\Entities\Tools\TrashCan; use BookStack\Http\Controller; use BookStack\References\ReferenceStore; @@ -14,19 +15,16 @@ 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')); - // Get application version - $version = trim(file_get_contents(base_path('version'))); - // Recycle bin details - $recycleStats = (new TrashCan())->getTrashedCounts(); + $recycleStats = $trashCan->getTrashedCounts(); return view('settings.maintenance', [ - 'version' => $version, + 'version' => AppVersion::get(), 'recycleStats' => $recycleStats, ]); }