Remove $DOCUMENTROOT, not used
This commit is contained in:
parent
03951ccc6b
commit
6d3ae575b6
|
@ -17,13 +17,6 @@ header("Content-Type: application/xrd+json");
|
||||||
*
|
*
|
||||||
'* but can also use complex database queries to generate the webfinger result
|
'* but can also use complex database queries to generate the webfinger result
|
||||||
**/
|
**/
|
||||||
// calculate the documentroot
|
|
||||||
// modified version of the one in lib/base.php that takes the .well-known symlink into account
|
|
||||||
/*$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
|
|
||||||
$SERVERROOT=str_replace("\\",'/',dirname(dirname(dirname(dirname(__FILE__)))));
|
|
||||||
$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT));
|
|
||||||
$WEBROOT=substr($SUBURI,0,-34);
|
|
||||||
*/
|
|
||||||
|
|
||||||
$userName = '';
|
$userName = '';
|
||||||
$hostName = '';
|
$hostName = '';
|
||||||
|
|
|
@ -121,8 +121,7 @@ class OC{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function initPaths(){
|
public static function initPaths(){
|
||||||
// calculate the documentroot
|
// calculate the root directories
|
||||||
$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']);
|
|
||||||
OC::$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13));
|
OC::$SERVERROOT=str_replace("\\",'/',substr(__FILE__,0,-13));
|
||||||
OC::$SUBURI= str_replace("\\","/",substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen(OC::$SERVERROOT)));
|
OC::$SUBURI= str_replace("\\","/",substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen(OC::$SERVERROOT)));
|
||||||
$scriptName=$_SERVER["SCRIPT_NAME"];
|
$scriptName=$_SERVER["SCRIPT_NAME"];
|
||||||
|
@ -137,9 +136,6 @@ class OC{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OC::$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen(OC::$SUBURI));
|
OC::$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen(OC::$SUBURI));
|
||||||
// try a new way to detect the WEBROOT which is simpler and also works with the app directory outside the owncloud folder. let´s see if this works for everybody
|
|
||||||
// OC::$WEBROOT=substr(OC::$SERVERROOT,strlen($DOCUMENTROOT));
|
|
||||||
|
|
||||||
|
|
||||||
if(OC::$WEBROOT!='' and OC::$WEBROOT[0]!=='/'){
|
if(OC::$WEBROOT!='' and OC::$WEBROOT[0]!=='/'){
|
||||||
OC::$WEBROOT='/'.OC::$WEBROOT;
|
OC::$WEBROOT='/'.OC::$WEBROOT;
|
||||||
|
|
Loading…
Reference in New Issue