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
parent758ec95ab45e2aca22e633511a668b61e86a054f (diff)
Remove unused code
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/AccountsController.php3
-rwxr-xr-xlib/Controller/MessagesController.php7
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/Controller/AccountsController.php b/lib/Controller/AccountsController.php
index 13b9710bd..ff937f41c 100644
--- a/lib/Controller/AccountsController.php
+++ b/lib/Controller/AccountsController.php
@@ -276,10 +276,9 @@ class AccountsController extends Controller {
* @param string $cc
* @param string $bcc
* @param int $uid
- * @param string $messageId
* @return JSONResponse
*/
- public function draft($accountId, $subject, $body, $to, $cc, $bcc, $uid, $messageId) {
+ public function draft($accountId, $subject, $body, $to, $cc, $bcc, $uid) {
if (is_null($uid)) {
$this->logger->info("Saving a new draft in account <$accountId>");
} else {
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) {