summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/CleanDataFolder.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2020-09-08 10:41:08 +0100
committerGreg Roach <greg@subaqua.co.uk>2020-09-08 16:25:33 +0100
commit696755093df43b466490c9156517a3ffb2d391a2 (patch)
treecf76cc2fd7eb2bc0977c4074d69cb74a64da1be1 /app/Http/RequestHandlers/CleanDataFolder.php
parent93386620a4f53d2d1f9a9425466271caeb937965 (diff)
downloadwebtrees-696755093df43b466490c9156517a3ffb2d391a2.tar.gz
webtrees-696755093df43b466490c9156517a3ffb2d391a2.tar.bz2
webtrees-696755093df43b466490c9156517a3ffb2d391a2.zip
Use factory to create caches and filesystems
Diffstat (limited to 'app/Http/RequestHandlers/CleanDataFolder.php')
-rw-r--r--app/Http/RequestHandlers/CleanDataFolder.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/Http/RequestHandlers/CleanDataFolder.php b/app/Http/RequestHandlers/CleanDataFolder.php
index ce37b1623b..2171b9c601 100644
--- a/app/Http/RequestHandlers/CleanDataFolder.php
+++ b/app/Http/RequestHandlers/CleanDataFolder.php
@@ -2,7 +2,7 @@
/**
* webtrees: online genealogy
- * Copyright (C) 2019 webtrees development team
+ * Copyright (C) 2020 webtrees development team
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -19,16 +19,15 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Http\RequestHandlers;
+use Fisharebest\Webtrees\Factory;
use Fisharebest\Webtrees\Http\ViewResponseTrait;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Services\TreeService;
-use League\Flysystem\FilesystemInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use function array_map;
-use function assert;
use function explode;
/**
@@ -58,8 +57,7 @@ class CleanDataFolder implements RequestHandlerInterface
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
- $data_filesystem = $request->getAttribute('filesystem.data');
- assert($data_filesystem instanceof FilesystemInterface);
+ $data_filesystem = Factory::filesystem()->data();
$this->layout = 'layouts/administration';