Merge pull request #14433 from owncloud/fix-public-php
Use `getParam` instead of `server`
This commit is contained in:
commit
0cdc2cebbf
|
@ -39,11 +39,12 @@ try {
|
||||||
OC::checkSingleUserMode();
|
OC::checkSingleUserMode();
|
||||||
$request = \OC::$server->getRequest();
|
$request = \OC::$server->getRequest();
|
||||||
$pathInfo = $request->getPathInfo();
|
$pathInfo = $request->getPathInfo();
|
||||||
if (!$pathInfo && !isset($request->server['service'])) {
|
|
||||||
|
if (!$pathInfo && $request->getParam('service', '') === '') {
|
||||||
header('HTTP/1.0 404 Not Found');
|
header('HTTP/1.0 404 Not Found');
|
||||||
exit;
|
exit;
|
||||||
} elseif (isset($request->server['service'])) {
|
} elseif ($request->getParam('service', '')) {
|
||||||
$service = $request->server['service'];
|
$service = $request->getParam('service', '');
|
||||||
} else {
|
} else {
|
||||||
$pathInfo = trim($pathInfo, '/');
|
$pathInfo = trim($pathInfo, '/');
|
||||||
list($service) = explode('/', $pathInfo);
|
list($service) = explode('/', $pathInfo);
|
||||||
|
|
Loading…
Reference in New Issue