summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/base.php b/lib/base.php
index 9db4a482f23..7659148c140 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -339,16 +339,6 @@ class OC {
}
/**
- * check if the instance needs to perform an upgrade
- *
- * @return bool
- * @deprecated use \OCP\Util::needUpgrade() instead
- */
- public static function needUpgrade() {
- return \OCP\Util::needUpgrade();
- }
-
- /**
* Checks if the version requires an update and shows
* @param bool $showTemplate Whether an update screen should get shown
* @return bool|void
@@ -509,13 +499,18 @@ class OC {
require_once $vendorAutoLoad;
} catch (\RuntimeException $e) {
- OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ if (!self::$CLI) {
+ OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ }
// we can't use the template error page here, because this needs the
// DI container which isn't available yet
print($e->getMessage());
exit();
}
+ // Add default composer PSR-4 autoloader
+ require_once OC::$SERVERROOT . '/lib/composer/autoload.php';
+
// setup the basic server
self::$server = new \OC\Server(\OC::$WEBROOT, self::$config);
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);