Skip to content
Snippets Groups Projects
Unverified Commit 5a6f7078 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

use injected IUrlGenerator instead

parent 1b03b81f
No related branches found
No related tags found
No related merge requests found
......@@ -393,7 +393,7 @@ class MessagesController extends Controller {
'messageId' => $messageId,
'attachmentId' => $attachment['id'],
]);
$downloadUrl = OC::$server->getURLGenerator()->getAbsoluteURL($downloadUrl);
$downloadUrl = $this->urlGenerator->getAbsoluteURL($downloadUrl);
$attachment['downloadUrl'] = $downloadUrl;
$attachment['mimeUrl'] = $this->mimeTypeDetector->mimeTypeIcon($attachment['mime']);
......@@ -436,12 +436,12 @@ class MessagesController extends Controller {
* @return string
*/
private function buildHtmlBodyUrl($accountId, $folderId, $messageId) {
$htmlBodyUrl = OC::$server->getURLGenerator()->linkToRoute('mail.messages.getHtmlBody', [
$htmlBodyUrl = $this->urlGenerator->linkToRoute('mail.messages.getHtmlBody', [
'accountId' => $accountId,
'folderId' => $folderId,
'messageId' => $messageId,
]);
return OC::$server->getURLGenerator()->getAbsoluteURL($htmlBodyUrl);
return $this->urlGenerator->getAbsoluteURL($htmlBodyUrl);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment