aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/container/ContainerBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r--application/container/ContainerBuilder.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php
index ba91fe8b..ccb87c3a 100644
--- a/application/container/ContainerBuilder.php
+++ b/application/container/ContainerBuilder.php
@@ -18,6 +18,8 @@ use Shaarli\Render\PageCacheManager;
18use Shaarli\Security\LoginManager; 18use Shaarli\Security\LoginManager;
19use Shaarli\Security\SessionManager; 19use Shaarli\Security\SessionManager;
20use Shaarli\Thumbnailer; 20use Shaarli\Thumbnailer;
21use Shaarli\Updater\Updater;
22use Shaarli\Updater\UpdaterUtils;
21 23
22/** 24/**
23 * Class ContainerBuilder 25 * Class ContainerBuilder
@@ -128,6 +130,15 @@ class ContainerBuilder
128 return new NetscapeBookmarkUtils($container->bookmarkService, $container->conf, $container->history); 130 return new NetscapeBookmarkUtils($container->bookmarkService, $container->conf, $container->history);
129 }; 131 };
130 132
133 $container['updater'] = function (ShaarliContainer $container): Updater {
134 return new Updater(
135 UpdaterUtils::read_updates_file($container->conf->get('resource.updates')),
136 $container->bookmarkService,
137 $container->conf,
138 $container->loginManager->isLoggedIn()
139 );
140 };
141
131 return $container; 142 return $container;
132 } 143 }
133} 144}