summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-16 16:26:02 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-16 22:13:01 +0100
commit992164446cf7da39078d879300475b6353e1d40f (patch)
tree6df581f39b6c61cc2e0199c8411bd7b5d1e53648 /lib/base.php
parent9f91d64918f70002ec5043613f83694137c2d9ee (diff)
downloadnextcloud-server-992164446cf7da39078d879300475b6353e1d40f.tar.gz
nextcloud-server-992164446cf7da39078d879300475b6353e1d40f.zip
Add blackmagic due to cyclic dependency :see_no_evil:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 51d59d130aa..5905aa0406f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -104,7 +104,14 @@ class OC {
* FIXME: The following line is required because of a cyclic dependency
* on IRequest.
*/
- $scriptName = $_SERVER['SCRIPT_NAME'];
+ $params = [
+ 'server' => [
+ 'SCRIPT_NAME' => $_SERVER['SCRIPT_NAME'],
+ 'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'],
+ ],
+ ];
+ $fakeRequest = new \OC\AppFramework\Http\Request($params, null, new \OC\AllConfig(new \OC\SystemConfig()));
+ $scriptName = $fakeRequest->getScriptName();
if (substr($scriptName, -1) == '/') {
$scriptName .= 'index.php';
//make sure suburi follows the same rules as scriptName