diff options
Diffstat (limited to 'apps/theming/lib/Controller')
-rw-r--r-- | apps/theming/lib/Controller/ThemingController.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index 2f0bfdd05ca..421af051998 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -100,6 +100,7 @@ class ThemingController extends Controller { * @param SCSSCacher $scssCacher * @param IURLGenerator $urlGenerator * @param IAppManager $appManager + * @param ImageManager $imageManager */ public function __construct( $appName, @@ -313,12 +314,7 @@ class ThemingController extends Controller { if (strpos($setting, 'Mime') !== -1) { $imageKey = str_replace('Mime', '', $setting); - try { - $file = $this->appData->getFolder('images')->getFile($imageKey); - $file->delete(); - } catch (NotFoundException $e) { - } catch (NotPermittedException $e) { - } + $this->imageManager->delete($imageKey); } return new DataResponse( @@ -344,8 +340,7 @@ class ThemingController extends Controller { */ public function getImage(string $key) { try { - /** @var File $file */ - $file = $this->appData->getFolder('images')->getFile($key); + $file = $this->imageManager->getImage($key); } catch (NotFoundException $e) { return new NotFoundResponse(); } |