summaryrefslogtreecommitdiffstats
path: root/library/Reporting/Cli/Command.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Reporting/Cli/Command.php')
-rw-r--r--library/Reporting/Cli/Command.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/Reporting/Cli/Command.php b/library/Reporting/Cli/Command.php
new file mode 100644
index 0000000..a89f77b
--- /dev/null
+++ b/library/Reporting/Cli/Command.php
@@ -0,0 +1,23 @@
+<?php
+// Icinga Reporting | (c) 2018 Icinga GmbH | GPLv2
+
+namespace Icinga\Module\Reporting\Cli;
+
+use Icinga\Application\Icinga;
+use Icinga\Application\Version;
+use Icinga\Module\Reporting\Database;
+
+class Command extends \Icinga\Cli\Command
+{
+ use Database;
+
+ // Fix Web 2 issue where $configs is not properly initialized
+ protected $configs = [];
+
+ public function init()
+ {
+ if (version_compare(Version::VERSION, '2.7.0', '<')) {
+ Icinga::app()->getModuleManager()->loadEnabledModules();
+ }
+ }
+}