|
|
|
@ -81,6 +81,14 @@ class OC{ |
|
|
|
date_default_timezone_set('Europe/Berlin'); |
|
|
|
ini_set('arg_separator.output','&'); |
|
|
|
|
|
|
|
//set http auth headers for apache+php-cgi work around
|
|
|
|
if (preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) |
|
|
|
{ |
|
|
|
list($name, $password) = explode(':', base64_decode($matches[1])); |
|
|
|
$_SERVER['PHP_AUTH_USER'] = strip_tags($name); |
|
|
|
$_SERVER['PHP_AUTH_PW'] = strip_tags($password); |
|
|
|
} |
|
|
|
|
|
|
|
// calculate the documentroot
|
|
|
|
OC::$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); |
|
|
|
OC::$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13)); |
|
|
|
|