Merge pull request #14433 from owncloud/fix-public-php

Use `getParam` instead of `server`
This commit is contained in:
Thomas Müller 2015-02-23 22:43:51 +01:00
commit 0cdc2cebbf

View file

@ -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);