diff --git a/inc/context.php b/inc/context.php index a85f2f05..6ff656fe 100644 --- a/inc/context.php +++ b/inc/context.php @@ -40,6 +40,12 @@ function build_context(array $config): Context { // Ensure the PDO is initialized. sql_open(); return $pdo; + }, + ReportQueries::class => function($c) { + $auto_maintenance = (bool)$c->get('config')['auto_maintenance']; + $pdo = $c->get(\PDO::class); + $cache = $c->get(CacheDriver::class); + return new ReportQueries($pdo, $cache, $auto_maintenance); } ]); }