summaryrefslogtreecommitdiffstats
path: root/appinfo/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'appinfo/app.php')
-rw-r--r--appinfo/app.php34
1 files changed, 22 insertions, 12 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 1cc9994ae..77e3fe19d 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -13,18 +13,28 @@
namespace OCA\News\AppInfo;
-$container = new Application();
+use \OCA\News\Config\DependencyException;
-$config = $container->getAppConfig();
-$config->loadConfig(__DIR__ . '/app.json');
-$config->registerNavigation();
-$config->registerBackgroundJobs();
-$config->registerHooks();
-// check for correct app dependencies
-try {
- $config->testDependencies();
-} catch(\OCA\News\Config\DependencyException $e) {
- $container->getLogger()->log($e->getMessage());
-}
+require_once __DIR__ . '/setup.php';
+if (is_setup()) {
+
+ $container = new Application();
+
+ $config = $container->getAppConfig();
+ $config->loadConfig(__DIR__ . '/app.json');
+ $config->registerNavigation();
+ $config->registerBackgroundJobs();
+ $config->registerHooks();
+
+ // check for correct app dependencies
+ try {
+ $config->testDependencies();
+ } catch(DependencyException $e) {
+ $logger = $container->getLogger();
+ $params = $container->getLoggerParameters();
+ $logger->emergency($e->getMessage(), $params);
+ }
+
+} \ No newline at end of file