Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-09-25 16:38:01 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-09-25 22:14:46 +0300
commite18386604921febd4fd8fd407c7a60e3757ad031 (patch)
treeafcc95e36651a23e938a1e18f81e267a34ee18ed /lib/Controller/MessagesController.php
parent758ec95ab45e2aca22e633511a668b61e86a054f (diff)
Remove unused code
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-xlib/Controller/MessagesController.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index a52500ecf..19dfc1d35 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -52,7 +52,6 @@ use OCP\Util;
class MessagesController extends Controller {
-
/** @var AccountService */
private $accountService;
@@ -238,7 +237,7 @@ class MessagesController extends Controller {
try {
$mailBox = $this->getFolder($accountId, $folderId);
- $m = $mailBox->getMessage($messageId, true);
+ $m = $mailBox->getMessage($messageId);
$html = $m->getHtmlBody($accountId, $folderId, $messageId, function($cid) use ($m){
$match = array_filter($m->attachments, function($a) use($cid){
return $a['cid'] === $cid;
@@ -305,15 +304,13 @@ class MessagesController extends Controller {
public function saveAttachment($accountId, $folderId, $messageId, $attachmentId, $targetPath) {
$mailBox = $this->getFolder($accountId, $folderId);
- $attachmentIds = [];
+ $attachmentIds = [$attachmentId];
if($attachmentId === 0) {
// Save all attachments
$m = $mailBox->getMessage($messageId);
$attachmentIds = array_map(function($a){
return $a['id'];
}, $m->attachments);
- } else {
- $attachmentIds = [$attachmentId];
}
foreach($attachmentIds as $attachmentId) {