summaryrefslogtreecommitdiffstats
path: root/appinfo/app.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 16:50:08 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-14 16:50:08 +0200
commit14e01888e5c0eef3dc216206e97fb9a0a9b6b1d6 (patch)
tree41787805f3a4ebebf590370832253ae2f11b0d35 /appinfo/app.php
parent242fdbf9fcc39795fe5567eadcb55c6709b303c5 (diff)
dont break on PHP 5.4
Diffstat (limited to 'appinfo/app.php')
-rw-r--r--appinfo/app.php38
1 files changed, 22 insertions, 16 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index cacd0637d..77e3fe19d 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -15,20 +15,26 @@ namespace OCA\News\AppInfo;
use \OCA\News\Config\DependencyException;
-$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);
-}
+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