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