summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/base.php b/lib/base.php
index aceac2e53c3..a4b5e9e01bf 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -115,9 +115,6 @@ class OC {
* the app path list is empty or contains an invalid path
*/
public static function initPaths() {
- // calculate the root directories
- OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4));
-
// ensure we can find OC_Config
set_include_path(
OC::$SERVERROOT . '/lib' . PATH_SEPARATOR .
@@ -519,10 +516,20 @@ class OC {
}
public static function init() {
+ // calculate the root directories
+ OC::$SERVERROOT = str_replace("\\", '/', substr(__DIR__, 0, -4));
+
// register autoloader
$loaderStart = microtime(true);
require_once __DIR__ . '/autoloader.php';
- self::$loader = new \OC\Autoloader();
+ self::$loader = new \OC\Autoloader([
+ OC::$SERVERROOT . '/lib',
+ OC::$SERVERROOT . '/core',
+ OC::$SERVERROOT . '/settings',
+ OC::$SERVERROOT . '/ocs',
+ OC::$SERVERROOT . '/ocs-provider',
+ OC::$SERVERROOT . '/3rdparty'
+ ]);
spl_autoload_register(array(self::$loader, 'load'));
$loaderEnd = microtime(true);
@@ -533,7 +540,7 @@ class OC {
// setup 3rdparty autoloader
$vendorAutoLoad = OC::$THIRDPARTYROOT . '/3rdparty/autoload.php';
if (!file_exists($vendorAutoLoad)) {
- throw new \RuntimeException('Composer autoloader not found, unable to continue. Check the folder "3rdparty".');
+ throw new \RuntimeException('Composer autoloader not found, unable to continue. Check the folder "3rdparty". Running "git submodule update --init" will initialize the git submodule that handles the subfolder "3rdparty".');
}
require_once $vendorAutoLoad;
@@ -663,7 +670,7 @@ class OC {
self::registerCacheHooks();
self::registerFilesystemHooks();
- if (\OC::$server->getSystemConfig()->getValue('enable_previews', true)) {
+ if ($systemConfig->getValue('enable_previews', true)) {
self::registerPreviewHooks();
}
self::registerShareHooks();