diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2019-04-10 09:05:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-10 09:05:15 +0200 |
commit | 1a401104865ef0421799cace88aededcc83fe639 (patch) | |
tree | 1d4fea5cff717ae311983fa0cc9fc3fc126d7722 | |
parent | dc9ab629db7b7d31724f63ac1bc624d5c396ae06 (diff) | |
parent | 1983ca1315ed7e2e3e5f3403589e257090bb5e48 (diff) |
Merge pull request #485 from nextcloud/SMillerDev-patch-1
Set tmp dir as cache for favicon
-rw-r--r-- | lib/AppInfo/Application.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 06d6135dc..518a5bd2f 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -17,6 +17,7 @@ use Closure; use FeedIo\FeedIo; use HTMLPurifier; use HTMLPurifier_Config; +use Favicon\Favicon; use OCA\News\Config\FetcherConfig; use OCA\News\Utility\PsrLogger; @@ -171,6 +172,13 @@ class Application extends App return new FeedIo($config->getClient(), $c->query(PsrLogger::class)); }); + $container->registerService(Favicon::class, function (IContainer $c): Favicon { + $favicon = new Favicon(); + $settings = ['dir' => sys_get_temp_dir()]; + $favicon->cache($settings); + return $favicon; + }); + /** * @noinspection PhpParamsInspection */ |