From 14591d9df70ed453b911b5c6647cb2fd20cf5be5 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 7 Oct 2015 11:13:47 +0200 Subject: Use injected request --- core/avatar/avatarcontroller.php | 2 +- settings/controller/certificatecontroller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/avatar/avatarcontroller.php b/core/avatar/avatarcontroller.php index eb2cb657104..97b3615c032 100644 --- a/core/avatar/avatarcontroller.php +++ b/core/avatar/avatarcontroller.php @@ -141,7 +141,7 @@ class AvatarController extends Controller { $files = $this->request->getUploadedFile('files'); $headers = []; - if (\OC::$server->getRequest()->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) { + if ($this->request->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) { // due to upload iframe workaround, need to set content-type to text/plain $headers['Content-Type'] = 'text/plain'; } diff --git a/settings/controller/certificatecontroller.php b/settings/controller/certificatecontroller.php index ef14ff3d9d9..750144e7a2c 100644 --- a/settings/controller/certificatecontroller.php +++ b/settings/controller/certificatecontroller.php @@ -69,7 +69,7 @@ class CertificateController extends Controller { */ public function addPersonalRootCertificate() { $headers = []; - if (\OC::$server->getRequest()->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) { + if ($this->request->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) { // due to upload iframe workaround, need to set content-type to text/plain $headers['Content-Type'] = 'text/plain'; } -- cgit v1.2.3