diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-02 12:56:36 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-02 12:56:36 +0200 |
commit | c0746f6b49dd4b4ea59ad9bb866989c1edfb5502 (patch) | |
tree | 4d863061d1f78d95a5b78ab0255f6a042455ccb8 /lib/private | |
parent | 4cc70ec39db3e7b07178a451ac56977b84564ca2 (diff) | |
parent | cf361b6b4afe76e3bb6295a1fdd80d5ad0badd65 (diff) | |
download | nextcloud-server-c0746f6b49dd4b4ea59ad9bb866989c1edfb5502.tar.gz nextcloud-server-c0746f6b49dd4b4ea59ad9bb866989c1edfb5502.zip |
Merge pull request #7968 from owncloud/core-overwritewebrootwithroot
Allow using "/" in "overwritewebroot"
Diffstat (limited to 'lib/private')
-rwxr-xr-x | lib/private/request.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/request.php b/lib/private/request.php index 8041c4f0048..7cbbb0676b1 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -166,10 +166,11 @@ class OC_Request { */ public static function scriptName() { $name = $_SERVER['SCRIPT_NAME']; - if (OC_Config::getValue('overwritewebroot', '') !== '' and self::isOverwriteCondition()) { + $overwriteWebRoot = OC_Config::getValue('overwritewebroot', ''); + if ($overwriteWebRoot !== '' and self::isOverwriteCondition()) { $serverroot = str_replace("\\", '/', substr(__DIR__, 0, -strlen('lib/private/'))); $suburi = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen($serverroot))); - $name = OC_Config::getValue('overwritewebroot', '') . $suburi; + $name = '/' . ltrim($overwriteWebRoot . $suburi, '/'); } return $name; } |