make sure we can load OC_Config when we need it

This commit is contained in:
Robin Appelman 2012-03-23 18:52:41 +01:00
parent 0e11cc9f6f
commit 109d806617
1 changed files with 9 additions and 1 deletions

View File

@ -139,6 +139,12 @@ 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', '');
@ -227,6 +233,7 @@ class OC{
// register autoloader
spl_autoload_register(array('OC','autoload'));
// set some stuff
//ob_start();
error_reporting(E_ALL | E_STRICT);
@ -253,13 +260,14 @@ class OC{
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
}
self::initPaths();
// register the stream wrappers
require_once('streamwrappers.php');
stream_wrapper_register("fakedir", "OC_FakeDirStream");
stream_wrapper_register('static', 'OC_StaticStreamWrapper');
stream_wrapper_register('close', 'OC_CloseStreamWrapper');
self::initPaths();
self::checkInstalled();
self::checkSSL();
self::checkUpgrade();