summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-26 04:09:48 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-26 04:09:48 +0100
commit6c501f90bb3bf61edbe507b9864146d1642a328b (patch)
tree6b7523485a14ae491f9268f9f5396ea451088d7e /lib/base.php
parent0af31a532818012e9db50aa7f2ec061c0924aa4d (diff)
downloadnextcloud-server-6c501f90bb3bf61edbe507b9864146d1642a328b.tar.gz
nextcloud-server-6c501f90bb3bf61edbe507b9864146d1642a328b.zip
hopefully a fix for webroot detection
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 342bdc6768e..404f3dd7f91 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -143,6 +143,13 @@ class OC{
$scriptName=$_SERVER["SCRIPT_NAME"];
if(substr($scriptName,-1)=='/'){
$scriptName.='index.php';
+ //make sure suburi follows the same rules as scriptName
+ if(substr(OC::$SUBURI,-9)!='index.php'){
+ if(substr(OC::$SUBURI,-1)!='/'){
+ OC::$SUBURI=OC::$SUBURI.'/';
+ }
+ OC::$SUBURI=OC::$SUBURI.'index.php';
+ }
}
OC::$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen(OC::$SUBURI));