summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-03 00:25:21 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-03 00:25:21 -0800
commita3b922763ef56337cb6bb5a7b52cf9f68bbce2a3 (patch)
tree69042f92c82dff18a0f31899b49d5865e36525c0 /lib/base.php
parent743c330f0353d6207a456a5e51ee9a81573e6b14 (diff)
parent37e6ac9a2aac288147efce7dc87e42edde14ba68 (diff)
downloadnextcloud-server-a3b922763ef56337cb6bb5a7b52cf9f68bbce2a3.tar.gz
nextcloud-server-a3b922763ef56337cb6bb5a7b52cf9f68bbce2a3.zip
Merge pull request #1416 from herbrechtsmeier/set_include_path_early
initPaths: set include path before any owncloud function is called
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/base.php b/lib/base.php
index 4f89a70db94..90e64f13af6 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -125,6 +125,13 @@ class OC {
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 .
+ get_include_path()
+ );
+
OC::$SUBURI = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT)));
$scriptName = OC_Request::scriptName();
if (substr($scriptName, -1) == '/') {
@@ -144,12 +151,6 @@ class OC {
OC::$WEBROOT = '/' . OC::$WEBROOT;
}
- // ensure we can find OC_Config
- set_include_path(
- OC::$SERVERROOT . '/lib' . PATH_SEPARATOR .
- get_include_path()
- );
-
// search the 3rdparty folder
if (OC_Config::getValue('3rdpartyroot', '') <> '' and OC_Config::getValue('3rdpartyurl', '') <> '') {
OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', '');