]> source.dussan.org Git - nextcloud-server.git/commit
Refactor OC_Request into TrustedDomainHelper and IRequest
authorLukas Reschke <lukas@owncloud.com>
Tue, 10 Feb 2015 12:02:48 +0000 (13:02 +0100)
committerLukas Reschke <lukas@owncloud.com>
Mon, 16 Feb 2015 21:13:00 +0000 (22:13 +0100)
commit886bda5f81d52ba4443094e4c2fffac33c27bc4b
tree7915861a5d11f8f45d7a279c51e6bcc827c37367
parent7f624188a77534856ecd53ac1d303ce5358e681e
Refactor OC_Request into TrustedDomainHelper and IRequest

This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
37 files changed:
lib/base.php
lib/private/app.php
lib/private/appframework/http/request.php
lib/private/connector/sabre/file.php
lib/private/connector/sabre/request.php
lib/private/installer.php
lib/private/log/owncloud.php
lib/private/request.php [deleted file]
lib/private/response.php
lib/private/route/router.php
lib/private/security/trusteddomainhelper.php [new file with mode: 0644]
lib/private/server.php
lib/private/setup.php
lib/private/template.php
lib/private/templatelayout.php
lib/private/urlgenerator.php
lib/private/util.php
lib/public/irequest.php
lib/public/util.php
ocs/v1.php
public.php
remote.php
settings/admin.php
tests/lib/appframework/controller/ApiControllerTest.php
tests/lib/appframework/controller/ControllerTest.php
tests/lib/appframework/controller/OCSControllerTest.php
tests/lib/appframework/dependencyinjection/DIContainerTest.php
tests/lib/appframework/http/DispatcherTest.php
tests/lib/appframework/http/RequestTest.php
tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
tests/lib/appframework/middleware/MiddlewareTest.php
tests/lib/appframework/middleware/security/CORSMiddlewareTest.php
tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
tests/lib/appframework/middleware/sessionmiddlewaretest.php
tests/lib/request.php [deleted file]
tests/lib/security/trusteddomainhelper.php [new file with mode: 0644]
tests/lib/templatelayout.php