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
1 changed files with 4 additions and 3 deletions

View File

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