Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Felamimail/Move): only log non-false iterate results
Browse files Browse the repository at this point in the history
  • Loading branch information
pschuele committed Sep 20, 2021
1 parent 300c534 commit 772ab7f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tine20/Felamimail/Controller/Message/Move.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ public function moveMessages($_messages, $_targetFolder, $keepOriginalMessages =
if ($_messages instanceof Tinebase_Model_Filter_FilterGroup) {
$iterator = new Tinebase_Record_Iterator(array(
'iteratable' => $this,
'controller' => $this,
'filter' => $_messages,
'function' => 'processMoveIteration',
'controller' => $this,
'filter' => $_messages,
'function' => 'processMoveIteration',
));
$iterateResult = $iterator->iterate($targetFolder, $keepOriginalMessages, $checkCopyPreventionConfig);

if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Moved/copied ' . $iterateResult['totalcount'] . ' message(s).');

if ($iterateResult && Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Moved/copied ' . $iterateResult['totalcount'] . ' message(s).');
}

$result = (! empty($iterateResult['results'])) ? array_pop($iterateResult['results']) : new Tinebase_Record_RecordSet('Felamimail_Model_Folder');
} else {
Expand Down

0 comments on commit 772ab7f

Please sign in to comment.